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

Issue 866173002: Plugin Power Saver: Add UI Overlay to throttled plugin using placeholder. (Closed)

Created:
5 years, 11 months ago by tommycli
Modified:
5 years, 10 months ago
CC:
groby-ooo-7-16, chromium-reviews, mkwst+moarreviews-renderer_chromium.org, darin-cc_chromium.org, jam, mlamouri+watch-content_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Plugin Power Saver: Add UI Overlay to throttled plugin using placeholder. This patch enables the following flow for throttled plugins: 1. Place real plugin on page, preroll for a few seconds until a keyframe is extracted. 2. On throttle, replace the plugin with a PluginPlaceholder. Set the extracted keyframe as the poster. Meanwhile, the real plugin is hidden, throttled, but still alive. 3. On clicking the placeholder, replace the placeholder with the original throttled plugin. BUG=443810, 403800 Committed: https://crrev.com/bde09712d6009e38b8c88316237d0736595814f7 Cr-Commit-Position: refs/heads/master@{#314724}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : attempt by setting plugin geometry to offscreen. #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Total comments: 6

Patch Set 7 : fix bug #

Patch Set 8 : #

Total comments: 28

Patch Set 9 : address bauerb and groby comments #

Total comments: 2

Patch Set 10 : #

Total comments: 12

Patch Set 11 : #

Patch Set 12 : Remove Ryan's 'play' button in favor of the pre-existing one. #

Patch Set 13 : #

Patch Set 14 : Make a PluginPreroller a RenderFrameObserver #

Total comments: 2

Patch Set 15 : Remove blink::WebPlugin::updateVisibility hack. #

Patch Set 16 : Remove stray comment. #

Total comments: 2

Patch Set 17 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+368 lines, -72 lines) Patch
M chrome/chrome_renderer.gypi View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/renderer/chrome_content_renderer_client.cc View 1 2 3 4 5 6 7 8 9 10 18 chunks +48 lines, -37 lines 0 comments Download
M chrome/renderer/plugins/chrome_plugin_placeholder.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -2 lines 0 comments Download
A chrome/renderer/plugins/plugin_preroller.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +63 lines, -0 lines 0 comments Download
A chrome/renderer/plugins/plugin_preroller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +88 lines, -0 lines 0 comments Download
M chrome/renderer/resources/plugin_poster.html View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +19 lines, -9 lines 0 comments Download
M components/plugins/renderer/loadable_plugin_placeholder.h View 1 2 3 4 5 15 4 chunks +15 lines, -2 lines 0 comments Download
M components/plugins/renderer/loadable_plugin_placeholder.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 11 chunks +73 lines, -17 lines 0 comments Download
M components/plugins/renderer/plugin_placeholder.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/public/renderer/plugin_instance_throttler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +14 lines, -1 line 0 comments Download
M content/renderer/pepper/pepper_plugin_instance_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/pepper/pepper_plugin_instance_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +10 lines, -0 lines 0 comments Download
M content/renderer/pepper/plugin_instance_throttler_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +9 lines, -0 lines 0 comments Download
M content/renderer/pepper/plugin_instance_throttler_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 6 chunks +23 lines, -3 lines 0 comments Download

Messages

Total messages: 31 (4 generated)
tommycli
bauerb, piman: PTAL This is a big patch. My apologies. It implements the preroll->placeholder->plugin flow ...
5 years, 10 months ago (2015-01-29 20:02:43 UTC) #2
groby-ooo-7-16
A few drive-by comments. https://codereview.chromium.org/866173002/diff/100001/chrome/renderer/plugins/plugin_preroller.cc File chrome/renderer/plugins/plugin_preroller.cc (right): https://codereview.chromium.org/866173002/diff/100001/chrome/renderer/plugins/plugin_preroller.cc#newcode90 chrome/renderer/plugins/plugin_preroller.cc:90: void PluginPreroller::OnThrottlerDestroyed() { On 2015/01/29 ...
5 years, 10 months ago (2015-01-30 02:22:44 UTC) #4
Bernhard Bauer
https://codereview.chromium.org/866173002/diff/100001/chrome/renderer/plugins/plugin_preroller.cc File chrome/renderer/plugins/plugin_preroller.cc (right): https://codereview.chromium.org/866173002/diff/100001/chrome/renderer/plugins/plugin_preroller.cc#newcode59 chrome/renderer/plugins/plugin_preroller.cc:59: void PluginPreroller::OnThrottleStateChange() { On 2015/01/29 20:02:43, tommycli wrote: > ...
5 years, 10 months ago (2015-01-30 14:12:57 UTC) #5
groby-ooo-7-16
https://codereview.chromium.org/866173002/diff/100001/chrome/renderer/plugins/plugin_preroller.cc File chrome/renderer/plugins/plugin_preroller.cc (right): https://codereview.chromium.org/866173002/diff/100001/chrome/renderer/plugins/plugin_preroller.cc#newcode90 chrome/renderer/plugins/plugin_preroller.cc:90: void PluginPreroller::OnThrottlerDestroyed() { On 2015/01/30 14:12:56, Bernhard Bauer wrote: ...
5 years, 10 months ago (2015-01-30 15:16:37 UTC) #6
tommycli
groby/bauerb: Thanks for prompt review. This is starting to look a bit more legit. https://codereview.chromium.org/866173002/diff/140001/chrome/renderer/chrome_content_renderer_client.cc ...
5 years, 10 months ago (2015-01-30 17:02:40 UTC) #7
tommycli
thestig: ptal at three files from chrome/ plz. thanks!
5 years, 10 months ago (2015-01-30 17:03:29 UTC) #9
Bernhard Bauer
LGTM! https://codereview.chromium.org/866173002/diff/150001/chrome/renderer/plugins/plugin_preroller.cc File chrome/renderer/plugins/plugin_preroller.cc (right): https://codereview.chromium.org/866173002/diff/150001/chrome/renderer/plugins/plugin_preroller.cc#newcode67 chrome/renderer/plugins/plugin_preroller.cc:67: IDR_PLUGIN_POSTER_HTML, message_, GURL(keyframe_data_url_), plugin_, The GURL() now isn't ...
5 years, 10 months ago (2015-01-30 17:11:10 UTC) #10
tommycli
bernhard: thanks! https://codereview.chromium.org/866173002/diff/150001/chrome/renderer/plugins/plugin_preroller.cc File chrome/renderer/plugins/plugin_preroller.cc (right): https://codereview.chromium.org/866173002/diff/150001/chrome/renderer/plugins/plugin_preroller.cc#newcode67 chrome/renderer/plugins/plugin_preroller.cc:67: IDR_PLUGIN_POSTER_HTML, message_, GURL(keyframe_data_url_), plugin_, On 2015/01/30 17:11:10, ...
5 years, 10 months ago (2015-01-30 17:45:17 UTC) #11
Lei Zhang
https://codereview.chromium.org/866173002/diff/170001/chrome/chrome_renderer.gypi File chrome/chrome_renderer.gypi (right): https://codereview.chromium.org/866173002/diff/170001/chrome/chrome_renderer.gypi#newcode41 chrome/chrome_renderer.gypi:41: 'renderer/plugins/chrome_plugin_placeholder.cc', Probably should try to move some of these ...
5 years, 10 months ago (2015-01-30 21:50:07 UTC) #12
tommycli
thestig: addressed your comments. Also, I was thinking we shouldn't add the 'play' graphic yet, ...
5 years, 10 months ago (2015-02-02 18:35:47 UTC) #13
tommycli
piman: ping for content/ review. Thanks!
5 years, 10 months ago (2015-02-02 20:21:32 UTC) #14
Lei Zhang
https://codereview.chromium.org/866173002/diff/170001/chrome/renderer/plugins/plugin_preroller.h File chrome/renderer/plugins/plugin_preroller.h (right): https://codereview.chromium.org/866173002/diff/170001/chrome/renderer/plugins/plugin_preroller.h#newcode27 chrome/renderer/plugins/plugin_preroller.h:27: // Does not take ownership of either |plugin| or ...
5 years, 10 months ago (2015-02-02 20:34:09 UTC) #15
tommycli
thestig: Sounds good. That way it can't leak past the lifespan of a RenderFrame. https://codereview.chromium.org/866173002/diff/170001/chrome/renderer/plugins/plugin_preroller.h ...
5 years, 10 months ago (2015-02-02 21:49:57 UTC) #16
Lei Zhang
lgtm
5 years, 10 months ago (2015-02-02 21:58:51 UTC) #17
tommycli
thestig: thanks!
5 years, 10 months ago (2015-02-02 22:10:11 UTC) #18
tommycli
piman: ping for content/ thanks!
5 years, 10 months ago (2015-02-03 22:35:07 UTC) #19
piman
https://codereview.chromium.org/866173002/diff/240001/content/renderer/pepper/pepper_plugin_instance_impl.cc File content/renderer/pepper/pepper_plugin_instance_impl.cc (right): https://codereview.chromium.org/866173002/diff/240001/content/renderer/pepper/pepper_plugin_instance_impl.cc#newcode2050 content/renderer/pepper/pepper_plugin_instance_impl.cc:2050: container_->setWebLayer(nullptr); When is this called exactly? Why are we ...
5 years, 10 months ago (2015-02-04 01:14:38 UTC) #20
tommycli
piman: thanks, see below https://codereview.chromium.org/866173002/diff/240001/content/renderer/pepper/pepper_plugin_instance_impl.cc File content/renderer/pepper/pepper_plugin_instance_impl.cc (right): https://codereview.chromium.org/866173002/diff/240001/content/renderer/pepper/pepper_plugin_instance_impl.cc#newcode2050 content/renderer/pepper/pepper_plugin_instance_impl.cc:2050: container_->setWebLayer(nullptr); On 2015/02/04 01:14:38, piman ...
5 years, 10 months ago (2015-02-04 01:18:04 UTC) #21
piman
On 2015/02/04 01:18:04, tommycli wrote: > piman: thanks, see below > > https://codereview.chromium.org/866173002/diff/240001/content/renderer/pepper/pepper_plugin_instance_impl.cc > File ...
5 years, 10 months ago (2015-02-04 01:43:32 UTC) #22
tommycli
piman: PTAL. I addressed your comment by removing the updateVisibility hack and threading the SetHiddenForPlaceholder ...
5 years, 10 months ago (2015-02-04 19:58:45 UTC) #23
piman
one last thing... https://codereview.chromium.org/866173002/diff/280001/content/renderer/pepper/pepper_plugin_instance_impl.cc File content/renderer/pepper/pepper_plugin_instance_impl.cc (right): https://codereview.chromium.org/866173002/diff/280001/content/renderer/pepper/pepper_plugin_instance_impl.cc#newcode2047 content/renderer/pepper/pepper_plugin_instance_impl.cc:2047: if (hidden) { thinking about this ...
5 years, 10 months ago (2015-02-05 00:34:36 UTC) #24
tommycli
piman: Sounds good! I was slightly concerned by that, but then I decided that UpdateLayer ...
5 years, 10 months ago (2015-02-05 00:46:36 UTC) #25
piman
LGTM. Yeah, that sounds better.
5 years, 10 months ago (2015-02-05 01:15:45 UTC) #26
tommycli
piman: thanks! this was a big patch, thx for sticking it out.
5 years, 10 months ago (2015-02-05 01:16:38 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/866173002/300001
5 years, 10 months ago (2015-02-05 01:17:37 UTC) #29
commit-bot: I haz the power
Committed patchset #17 (id:300001)
5 years, 10 months ago (2015-02-05 02:39:28 UTC) #30
commit-bot: I haz the power
5 years, 10 months ago (2015-02-05 02:40:32 UTC) #31
Message was sent while issue was closed.
Patchset 17 (id:??) landed as
https://crrev.com/bde09712d6009e38b8c88316237d0736595814f7
Cr-Commit-Position: refs/heads/master@{#314724}

Powered by Google App Engine
This is Rietveld 408576698