New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 655415 link

Starred by 4 users

Issue metadata

Status: WontFix
Owner:
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug
Team-Security-UX

Blocking:
issue 638732



Sign in to add a comment

Allow navigator.vibrate to be gated on site engagement

Project Member Reported by dominickn@chromium.org, Oct 13 2016

Issue description

This involves:

1. Adding a Mojo service (EngagementService) that is exposed on RenderFrames from the browser process.

2. Making the VibrationController query the EngagementService via its frame() object over Mojo whether it is allowed to vibrate.

3. Gating the EngagementService check on a feature using the Feature API (must be explicitly enabled)

4. Allowing the engagement threshold at which vibration is permitted to be tuned using Variations
 
Labels: -Pri-3 Pri-2
Labels: Team-Security-UX
Components: Internals>Permissions>Model Internals>Permissions>SiteEngagement
Labels: -Team-Security-UX
Project Member

Comment 4 by bugdroid1@chromium.org, Dec 20 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6c1f1cf3c31b4c798708cb17d4ecd8e6db37e833

commit 6c1f1cf3c31b4c798708cb17d4ecd8e6db37e833
Author: dominickn <dominickn@chromium.org>
Date: Tue Dec 20 06:13:33 2016

Plumb site engagement to the renderer process.

This CL generalises the EngagementLevel concept in site engagement,
moving it to a Mojo enum in Blink's public/platform. Prior to each
navigation commit, and when the engagement level for an origin changes
between buckets, the browser process sends the new level to all renderers
which are navigated to that origin. Using the discrete levels rather
than the continuous score minimises the IPC overhead to one additional
IPC per navigation commit per frame, and one IPC per engagement level
change.

The engagement level is stored on Document within the renderer, with
a temporary stop on RenderFrameImpl if sent prior to navigation commit.
This is a first step to enabling the collection of UseCounter data for
JavaScript API usage against engagement buckets.

BUG= 655415 

Review-Url: https://codereview.chromium.org/2535483002
Cr-Commit-Position: refs/heads/master@{#439726}

[modify] https://crrev.com/6c1f1cf3c31b4c798708cb17d4ecd8e6db37e833/chrome/browser/DEPS
[modify] https://crrev.com/6c1f1cf3c31b4c798708cb17d4ecd8e6db37e833/chrome/browser/engagement/important_sites_util.cc
[modify] https://crrev.com/6c1f1cf3c31b4c798708cb17d4ecd8e6db37e833/chrome/browser/engagement/site_engagement_helper.cc
[modify] https://crrev.com/6c1f1cf3c31b4c798708cb17d4ecd8e6db37e833/chrome/browser/engagement/site_engagement_helper.h
[modify] https://crrev.com/6c1f1cf3c31b4c798708cb17d4ecd8e6db37e833/chrome/browser/engagement/site_engagement_score.cc
[modify] https://crrev.com/6c1f1cf3c31b4c798708cb17d4ecd8e6db37e833/chrome/browser/engagement/site_engagement_score.h
[modify] https://crrev.com/6c1f1cf3c31b4c798708cb17d4ecd8e6db37e833/chrome/browser/engagement/site_engagement_service.cc
[modify] https://crrev.com/6c1f1cf3c31b4c798708cb17d4ecd8e6db37e833/chrome/browser/engagement/site_engagement_service.h
[modify] https://crrev.com/6c1f1cf3c31b4c798708cb17d4ecd8e6db37e833/chrome/browser/engagement/site_engagement_service_unittest.cc
[modify] https://crrev.com/6c1f1cf3c31b4c798708cb17d4ecd8e6db37e833/content/public/app/mojo/content_renderer_manifest.json
[modify] https://crrev.com/6c1f1cf3c31b4c798708cb17d4ecd8e6db37e833/content/renderer/render_frame_impl.cc
[modify] https://crrev.com/6c1f1cf3c31b4c798708cb17d4ecd8e6db37e833/content/renderer/render_frame_impl.h
[modify] https://crrev.com/6c1f1cf3c31b4c798708cb17d4ecd8e6db37e833/content/renderer/render_thread_impl.cc
[modify] https://crrev.com/6c1f1cf3c31b4c798708cb17d4ecd8e6db37e833/third_party/WebKit/Source/core/dom/Document.cpp
[modify] https://crrev.com/6c1f1cf3c31b4c798708cb17d4ecd8e6db37e833/third_party/WebKit/Source/core/dom/Document.h
[modify] https://crrev.com/6c1f1cf3c31b4c798708cb17d4ecd8e6db37e833/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
[modify] https://crrev.com/6c1f1cf3c31b4c798708cb17d4ecd8e6db37e833/third_party/WebKit/Source/web/WebLocalFrameImpl.h
[modify] https://crrev.com/6c1f1cf3c31b4c798708cb17d4ecd8e6db37e833/third_party/WebKit/public/BUILD.gn
[add] https://crrev.com/6c1f1cf3c31b4c798708cb17d4ecd8e6db37e833/third_party/WebKit/public/platform/site_engagement.mojom
[modify] https://crrev.com/6c1f1cf3c31b4c798708cb17d4ecd8e6db37e833/third_party/WebKit/public/web/WebLocalFrame.h

Project Member

Comment 6 by bugdroid1@chromium.org, Jan 19 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/89fba275a0be24ab7a318f92f179f7c9495ccae0

commit 89fba275a0be24ab7a318f92f179f7c9495ccae0
Author: dominickn <dominickn@chromium.org>
Date: Thu Jan 19 00:40:46 2017

Replace std::map with std::pair for (origin, engagement) tuples in RenderFrameImpl.

The engagement level should correspond to precisely one origin within
a frame. This CL replaces its map temporary storage variable with
a pair.

BUG= 655415 

Review-Url: https://codereview.chromium.org/2627393002
Cr-Commit-Position: refs/heads/master@{#444570}

[modify] https://crrev.com/89fba275a0be24ab7a318f92f179f7c9495ccae0/content/renderer/render_frame_impl.cc
[modify] https://crrev.com/89fba275a0be24ab7a318f92f179f7c9495ccae0/content/renderer/render_frame_impl.h

Dom: can we close this now? I think we decided not to use site engagement for vibrate in the end?
Status: WontFix (was: Assigned)
WontFixing out.
Project Member

Comment 9 by bugdroid1@chromium.org, Sep 10

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e176837ed0026845f28b6a1d87e978f178e9f809

commit e176837ed0026845f28b6a1d87e978f178e9f809
Author: Dominick Ng <dominickn@chromium.org>
Date: Mon Sep 10 06:11:20 2018

Stop plumbing engagement to the renderer.

Site engagement levels in the renderer are only used for some metrics.
We have decided to not use engagement for gating APIs directly in the
renderer. This CL removes the IPC messaging for sending engagement to
the renderer to reduce the IPC overhead (1 message every navigation,
+1 message every time the coarse engagement level changed over the
lifetime of a page).

BUG= 655415 

Change-Id: I8b04f75b11631cd0102717b37bf665a2a503c79d
Reviewed-on: https://chromium-review.googlesource.com/1208995
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Ben Wells <benwells@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Dominick Ng <dominickn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589829}
[modify] https://crrev.com/e176837ed0026845f28b6a1d87e978f178e9f809/chrome/browser/engagement/site_engagement_helper.cc
[modify] https://crrev.com/e176837ed0026845f28b6a1d87e978f178e9f809/chrome/browser/engagement/site_engagement_helper.h
[modify] https://crrev.com/e176837ed0026845f28b6a1d87e978f178e9f809/chrome/browser/engagement/site_engagement_service.cc
[modify] https://crrev.com/e176837ed0026845f28b6a1d87e978f178e9f809/chrome/browser/engagement/site_engagement_service.h
[modify] https://crrev.com/e176837ed0026845f28b6a1d87e978f178e9f809/content/renderer/render_frame_impl.cc
[modify] https://crrev.com/e176837ed0026845f28b6a1d87e978f178e9f809/content/renderer/render_frame_impl.h
[modify] https://crrev.com/e176837ed0026845f28b6a1d87e978f178e9f809/third_party/blink/public/platform/site_engagement.mojom
[modify] https://crrev.com/e176837ed0026845f28b6a1d87e978f178e9f809/third_party/blink/public/web/web_local_frame.h
[modify] https://crrev.com/e176837ed0026845f28b6a1d87e978f178e9f809/third_party/blink/renderer/core/dom/document.cc
[modify] https://crrev.com/e176837ed0026845f28b6a1d87e978f178e9f809/third_party/blink/renderer/core/dom/document.h
[modify] https://crrev.com/e176837ed0026845f28b6a1d87e978f178e9f809/third_party/blink/renderer/core/frame/local_dom_window.cc
[modify] https://crrev.com/e176837ed0026845f28b6a1d87e978f178e9f809/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
[modify] https://crrev.com/e176837ed0026845f28b6a1d87e978f178e9f809/third_party/blink/renderer/core/frame/web_local_frame_impl.h
[modify] https://crrev.com/e176837ed0026845f28b6a1d87e978f178e9f809/third_party/blink/renderer/modules/vibration/navigator_vibration.cc

Sign in to add a comment