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

Issue 904913003: Plugin Power Saver: Fix implicitly sized and below the fold plugins. (Closed)

Created:
5 years, 10 months ago by tommycli
Modified:
5 years, 10 months ago
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, creis+watch_chromium.org, nasko+codewatch_chromium.org, jam, darin-cc_chromium.org, mkwst+moarreviews-renderer_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: Fix implicitly sized and below the fold plugins. This patch changes a few behaviors. 1. Make implicitly sized (e.g. width="100%") plugins work with Plugin Power Saver. Previously sizes were read from plugin parameters, which doesn't work for implicitly sized plugins. Now, we look at the actual blink::WebRect view bounds. 2. Timeout keyframe extraction after 150 frames rather than a fixed 5 seconds. The previous behavior was broken for plugins that are loaded off-screen. (The countdown begins even though no frames are being generated until the plugin goes on-screen). 3. When "Detect and run..." is on, always respect the 'poster' parameter. This is a tweak to the existing behavior, which is to use the 'poster' param only for peripheral plugins. This should have no user impact, since no one actually uses the 'poster' param right now. 4. Clean up metric collection in LoadablePluginPlaceholder. Previous behavior was overcounting in some circumstances. 5. Reduces RenderFrame public interface and total SLOC. BUG=443431, 456217, 403800 Committed: https://crrev.com/d7798e13906ebb1b531043738446eb378da369b1 Cr-Commit-Position: refs/heads/master@{#315393}

Patch Set 1 #

Patch Set 2 : self review #

Patch Set 3 : #

Patch Set 4 : add back documentation. #

Patch Set 5 : fix windows compile #

Total comments: 5

Patch Set 6 : Move Get Poster call to anon namespace #

Total comments: 2

Patch Set 7 : bah #

Total comments: 4

Patch Set 8 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+249 lines, -336 lines) Patch
M chrome/renderer/chrome_content_renderer_client.cc View 1 2 3 4 5 6 7 4 chunks +37 lines, -41 lines 0 comments Download
M chrome/renderer/plugins/chrome_plugin_placeholder.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/renderer/plugins/plugin_preroller.cc View 1 chunk +1 line, -2 lines 0 comments Download
M components/plugins/renderer/loadable_plugin_placeholder.h View 1 3 chunks +7 lines, -4 lines 0 comments Download
M components/plugins/renderer/loadable_plugin_placeholder.cc View 1 2 7 chunks +14 lines, -14 lines 0 comments Download
M content/public/renderer/plugin_instance_throttler.h View 1 2 3 4 5 2 chunks +5 lines, -19 lines 0 comments Download
M content/public/renderer/render_frame.h View 1 chunk +0 lines, -28 lines 0 comments Download
M content/renderer/pepper/pepper_plugin_instance_impl.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M content/renderer/pepper/plugin_instance_throttler_impl.h View 1 2 3 4 5 6 3 chunks +30 lines, -25 lines 0 comments Download
M content/renderer/pepper/plugin_instance_throttler_impl.cc View 1 2 3 4 5 9 chunks +51 lines, -49 lines 0 comments Download
M content/renderer/pepper/plugin_instance_throttler_impl_unittest.cc View 1 2 3 4 5 6 3 chunks +20 lines, -2 lines 0 comments Download
M content/renderer/pepper/plugin_power_saver_helper.h View 1 2 3 2 chunks +28 lines, -3 lines 0 comments Download
M content/renderer/pepper/plugin_power_saver_helper.cc View 6 chunks +11 lines, -54 lines 0 comments Download
M content/renderer/pepper/plugin_power_saver_helper_browsertest.cc View 4 chunks +38 lines, -76 lines 0 comments Download
M content/renderer/render_frame_impl.h View 1 chunk +3 lines, -5 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 chunk +0 lines, -13 lines 0 comments Download

Messages

Total messages: 19 (4 generated)
tommycli
piman/thestig/bauerb: PTAL This is mostly a bugfix and refactor CL. Behavior changes are documented in ...
5 years, 10 months ago (2015-02-06 19:15:44 UTC) #3
piman
https://codereview.chromium.org/904913003/diff/80001/content/public/renderer/plugin_instance_throttler.h File content/public/renderer/plugin_instance_throttler.h (right): https://codereview.chromium.org/904913003/diff/80001/content/public/renderer/plugin_instance_throttler.h#newcode69 content/public/renderer/plugin_instance_throttler.h:69: const GURL& page_base_url); Why is this even here? It ...
5 years, 10 months ago (2015-02-06 22:13:12 UTC) #4
tommycli
https://codereview.chromium.org/904913003/diff/80001/content/public/renderer/plugin_instance_throttler.h File content/public/renderer/plugin_instance_throttler.h (right): https://codereview.chromium.org/904913003/diff/80001/content/public/renderer/plugin_instance_throttler.h#newcode69 content/public/renderer/plugin_instance_throttler.h:69: const GURL& page_base_url); On 2015/02/06 22:13:12, piman (Very slow ...
5 years, 10 months ago (2015-02-06 22:57:10 UTC) #5
tommycli
piman: Actually are you sure we need to contact blink-dev? It's not a new attribute. ...
5 years, 10 months ago (2015-02-06 22:58:20 UTC) #6
piman
lgtm https://codereview.chromium.org/904913003/diff/80001/content/renderer/pepper/plugin_instance_throttler_impl_unittest.cc File content/renderer/pepper/plugin_instance_throttler_impl_unittest.cc (right): https://codereview.chromium.org/904913003/diff/80001/content/renderer/pepper/plugin_instance_throttler_impl_unittest.cc#newcode83 content/renderer/pepper/plugin_instance_throttler_impl_unittest.cc:83: TEST_F(PluginInstanceThrottlerImplTest, PosterImage) { This could still go to ...
5 years, 10 months ago (2015-02-07 00:02:13 UTC) #7
piman
On Fri, Feb 6, 2015 at 2:58 PM, <tommycli@chromium.org> wrote: > piman: > > Actually ...
5 years, 10 months ago (2015-02-07 00:05:49 UTC) #8
Bernhard Bauer
lgtm https://codereview.chromium.org/904913003/diff/60002/content/renderer/pepper/plugin_instance_throttler_impl.h File content/renderer/pepper/plugin_instance_throttler_impl.h (right): https://codereview.chromium.org/904913003/diff/60002/content/renderer/pepper/plugin_instance_throttler_impl.h#newcode29 content/renderer/pepper/plugin_instance_throttler_impl.h:29: static const int kMaximumFramesToExamine; Make this private, seeing ...
5 years, 10 months ago (2015-02-09 11:52:28 UTC) #9
tommycli
bauerb: Moved constant to the private. Had to add a new field to the test ...
5 years, 10 months ago (2015-02-09 19:22:11 UTC) #11
tommycli
thestig: ptal, thanks!
5 years, 10 months ago (2015-02-09 19:22:31 UTC) #12
Lei Zhang
https://codereview.chromium.org/904913003/diff/90001/chrome/renderer/chrome_content_renderer_client.cc File chrome/renderer/chrome_content_renderer_client.cc (right): https://codereview.chromium.org/904913003/diff/90001/chrome/renderer/chrome_content_renderer_client.cc#newcode277 chrome/renderer/chrome_content_renderer_client.cc:277: if (params.attributeNames[i] == "poster") { Should this be params.attributeNames[i].utf8() ...
5 years, 10 months ago (2015-02-09 20:02:05 UTC) #13
tommycli
thestig: addressed your comments. Thanks! https://codereview.chromium.org/904913003/diff/90001/chrome/renderer/chrome_content_renderer_client.cc File chrome/renderer/chrome_content_renderer_client.cc (right): https://codereview.chromium.org/904913003/diff/90001/chrome/renderer/chrome_content_renderer_client.cc#newcode277 chrome/renderer/chrome_content_renderer_client.cc:277: if (params.attributeNames[i] == "poster") ...
5 years, 10 months ago (2015-02-09 20:12:17 UTC) #14
Lei Zhang
lgtm
5 years, 10 months ago (2015-02-09 20:18:23 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/904913003/110001
5 years, 10 months ago (2015-02-09 20:20:36 UTC) #17
commit-bot: I haz the power
Committed patchset #8 (id:110001)
5 years, 10 months ago (2015-02-09 21:09:12 UTC) #18
commit-bot: I haz the power
5 years, 10 months ago (2015-02-09 21:10:19 UTC) #19
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/d7798e13906ebb1b531043738446eb378da369b1
Cr-Commit-Position: refs/heads/master@{#315393}

Powered by Google App Engine
This is Rietveld 408576698