Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(213)

Issue 1906533002: Add 'autoplay' content settings and expose it to Blink. (Closed)

Created:
4 years, 8 months ago by mlamouri (slow - plz ping)
Modified:
4 years, 7 months ago
CC:
blink-reviews, blink-reviews-api_chromium.org, chromium-reviews, dglazkov+blink, Finnur, gavinp+loader_chromium.org, Nate Chapin, loading-reviews_chromium.org, markusheintz_, msramek+watch_chromium.org, raymes+watch_chromium.org, tyoshino+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add 'autoplay' content settings and expose it to Blink. The new content settings is CONTENT_SETTINGS_TYPE_AUTOPLAY and it is exposed to Blink via WebContentSettingsClient::allowAutoplay(). The client is kept is sync by the browser process to avoid sync IPC or adding complex asynchronous logic to HTMLMediaElement. This CL doesn't add UI nor use the settings in order to keep things compartmented. HTMLMediaElement will check the settings value in some situations. More context in here: https://docs.google.com/presentation/d/17ZXOdGosCso_SoMvQ9ckCsElvn_0YW2Q13y5ZqQ9dyU/edit BUG=604751 Committed: https://crrev.com/709d8a936ef6aefde7411adb814744dc864c8d49 Cr-Commit-Position: refs/heads/master@{#390065}

Patch Set 1 #

Total comments: 2

Patch Set 2 : add tests and apply comments #

Patch Set 3 : #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+129 lines, -4 lines) Patch
M chrome/browser/chrome_content_browser_client.cc View 1 2 chunks +7 lines, -1 line 0 comments Download
M chrome/browser/content_settings/host_content_settings_map_unittest.cc View 1 3 chunks +29 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/content_settings/content_settings_apitest.cc View 1 3 chunks +11 lines, -0 lines 0 comments Download
M chrome/common/render_messages.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/renderer/content_settings_observer.h View 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/renderer/content_settings_observer.cc View 1 2 1 chunk +12 lines, -0 lines 2 comments Download
M chrome/renderer/content_settings_observer_browsertest.cc View 1 1 chunk +38 lines, -0 lines 1 comment Download
M components/content_settings/core/browser/content_settings_registry.cc View 1 chunk +7 lines, -0 lines 0 comments Download
M components/content_settings/core/browser/content_settings_utils.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M components/content_settings/core/common/content_settings.h View 1 chunk +1 line, -0 lines 0 comments Download
M components/content_settings/core/common/content_settings.cc View 1 chunk +1 line, -0 lines 0 comments Download
M components/content_settings/core/common/content_settings_types.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/loader/FrameLoaderClient.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/web/FrameLoaderClientImpl.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp View 1 chunk +8 lines, -0 lines 0 comments Download
M third_party/WebKit/public/web/WebContentSettingsClient.h View 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 32 (10 generated)
mlamouri (slow - plz ping)
+bauerb@ for early look.
4 years, 8 months ago (2016-04-20 15:18:16 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1906533002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1906533002/1
4 years, 8 months ago (2016-04-20 15:18:41 UTC) #4
Bernhard Bauer
Just as a data point for comparison: For plugins we do a synchronous IPC back ...
4 years, 8 months ago (2016-04-20 16:08:54 UTC) #5
mlamouri (slow - plz ping)
On 2016/04/20 at 16:08:54, bauerb wrote: > Just as a data point for comparison: For ...
4 years, 8 months ago (2016-04-20 16:11:17 UTC) #6
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-20 16:49:22 UTC) #8
mlamouri (slow - plz ping)
Reviewers, can you PTAL at: bauerb: chrome/browser/content_settings/host_content_settings_map_unittest.cc components/content_settings/* jochen: chrome/browser/extensions/* chrome/renderer/* third_party/WebKit/* mkwst: chrome/common/render_messages.h Thanks! ...
4 years, 8 months ago (2016-04-20 18:36:47 UTC) #11
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1906533002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1906533002/40001
4 years, 8 months ago (2016-04-20 18:37:22 UTC) #13
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-20 20:57:19 UTC) #15
raymes
Just my thoughts :) https://codereview.chromium.org/1906533002/diff/40001/chrome/renderer/content_settings_observer.cc File chrome/renderer/content_settings_observer.cc (right): https://codereview.chromium.org/1906533002/diff/40001/chrome/renderer/content_settings_observer.cc#newcode497 chrome/renderer/content_settings_observer.cc:497: frame->document().getSecurityOrigin().toString())) == Resolving content settings ...
4 years, 8 months ago (2016-04-21 04:01:56 UTC) #17
Bernhard Bauer
https://codereview.chromium.org/1906533002/diff/40001/chrome/renderer/content_settings_observer.cc File chrome/renderer/content_settings_observer.cc (right): https://codereview.chromium.org/1906533002/diff/40001/chrome/renderer/content_settings_observer.cc#newcode497 chrome/renderer/content_settings_observer.cc:497: frame->document().getSecurityOrigin().toString())) == On 2016/04/21 04:01:56, raymes wrote: > Resolving ...
4 years, 8 months ago (2016-04-21 08:20:44 UTC) #18
mlamouri (slow - plz ping)
I don't think we should add any new sync IPC. In the long term, we ...
4 years, 8 months ago (2016-04-21 15:16:47 UTC) #19
mlamouri (slow - plz ping)
Review ping.
4 years, 8 months ago (2016-04-25 13:08:01 UTC) #20
Bernhard Bauer
LGTM I'm still not a huge fan of pushing down the content setting rules (for ...
4 years, 8 months ago (2016-04-25 14:01:49 UTC) #21
raymes
I agree. I wasn't suggesting adding a new sync IPC, instead reusing an existing one. ...
4 years, 8 months ago (2016-04-26 05:11:04 UTC) #22
raymes
Btw please feel free to land this if you need to make progress and we ...
4 years, 8 months ago (2016-04-26 09:28:39 UTC) #23
raymes
Btw please feel free to land this if you need to make progress and we ...
4 years, 8 months ago (2016-04-26 09:28:39 UTC) #24
mlamouri (slow - plz ping)
jochen@ and mkwst@, can you PTAL :)
4 years, 8 months ago (2016-04-26 15:25:37 UTC) #25
jochen (gone - plz use gerrit)
lgtm
4 years, 7 months ago (2016-04-27 12:02:16 UTC) #26
Mike West
IPC LGTM.
4 years, 7 months ago (2016-04-27 12:20:05 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1906533002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1906533002/40001
4 years, 7 months ago (2016-04-27 12:51:58 UTC) #29
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 7 months ago (2016-04-27 14:25:09 UTC) #30
commit-bot: I haz the power
4 years, 7 months ago (2016-04-27 14:26:18 UTC) #32
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/709d8a936ef6aefde7411adb814744dc864c8d49
Cr-Commit-Position: refs/heads/master@{#390065}

Powered by Google App Engine
This is Rietveld 408576698