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

Issue 849723002: Plugin Power Saver: Make PepperPluginInstanceThrottler interface public. (Closed)

Created:
5 years, 11 months ago by tommycli
Modified:
5 years, 11 months ago
CC:
groby-ooo-7-16, 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: Make PepperPluginInstanceThrottler interface public. This patch does a few things. a) Make PepperPluginInstanceThrottler under content/public. We want to add an overlay for throttled Flash instances, and the plugin placeholder seems to be a logical place to do this. We make this interface public so the placeholder knows when it is throttled and how to unthrottle the plugin. b) Rename PepperPluginInstanceThrottler -> PluginInstanceThrottler. Soon there is no more NPAPI, so shorten the name. c) Refactor some metrics collection code out of PluginInstanceThrottler and PepperPluginInstanceImpl and into a separate pepper_plugin_instance_metrics file. BUG=403800 Committed: https://crrev.com/e87227095477cea2725cc9d4cbaa49811455736c Cr-Commit-Position: refs/heads/master@{#311873}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : split metrics into separate file. #

Patch Set 5 : #

Patch Set 6 : fix test #

Patch Set 7 : #

Patch Set 8 : #

Patch Set 9 : #

Patch Set 10 : rebase #

Patch Set 11 : #

Patch Set 12 : #

Total comments: 12

Patch Set 13 : #

Patch Set 14 : #

Total comments: 6

Patch Set 15 : #

Patch Set 16 : add back missing constructors #

Patch Set 17 : #

Total comments: 6

Patch Set 18 : #

Total comments: 12

Patch Set 19 : #

Total comments: 4

Patch Set 20 : #

Patch Set 21 : #

Patch Set 22 : #

Total comments: 8

Patch Set 23 : #

Patch Set 24 : #

Total comments: 6

Patch Set 25 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+514 lines, -924 lines) Patch
M chrome/renderer/chrome_content_renderer_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 5 chunks +16 lines, -8 lines 0 comments Download
M components/plugins/renderer/plugin_placeholder.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +4 lines, -4 lines 0 comments Download
M components/plugins/renderer/plugin_placeholder.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 4 chunks +9 lines, -3 lines 0 comments Download
M content/content_renderer.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +9 lines, -2 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M content/public/renderer/BUILD.gn View 1 2 3 4 1 chunk +7 lines, -0 lines 0 comments Download
A + content/public/renderer/plugin_instance_throttler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 3 chunks +42 lines, -77 lines 0 comments Download
A content/public/renderer/plugin_instance_throttler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 23 24 1 chunk +26 lines, -0 lines 0 comments Download
M content/public/renderer/render_frame.h View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +4 lines, -11 lines 0 comments Download
M content/renderer/pepper/pepper_graphics_2d_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +4 lines, -2 lines 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 7 chunks +13 lines, -5 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 17 9 chunks +33 lines, -48 lines 0 comments Download
A content/renderer/pepper/pepper_plugin_instance_metrics.h View 1 2 3 1 chunk +29 lines, -0 lines 0 comments Download
A content/renderer/pepper/pepper_plugin_instance_metrics.cc View 1 2 3 23 24 1 chunk +108 lines, -0 lines 0 comments Download
D content/renderer/pepper/pepper_plugin_instance_throttler.h View 1 chunk +0 lines, -126 lines 0 comments Download
D content/renderer/pepper/pepper_plugin_instance_throttler.cc View 1 chunk +0 lines, -221 lines 0 comments Download
D content/renderer/pepper/pepper_plugin_instance_throttler_unittest.cc View 1 chunk +0 lines, -216 lines 0 comments Download
M content/renderer/pepper/pepper_webplugin_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +3 lines, -3 lines 0 comments Download
M content/renderer/pepper/pepper_webplugin_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +4 lines, -3 lines 0 comments Download
A 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 17 18 19 1 chunk +86 lines, -0 lines 0 comments Download
A + 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 17 18 19 5 chunks +54 lines, -138 lines 0 comments Download
A + content/renderer/pepper/plugin_instance_throttler_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 9 chunks +47 lines, -45 lines 0 comments Download
M content/renderer/pepper/ppb_audio_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +3 lines, -3 lines 0 comments Download
M content/renderer/pepper/ppb_graphics_3d_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +4 lines, -3 lines 0 comments Download
M content/renderer/render_frame_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +7 lines, -4 lines 0 comments Download

Messages

Total messages: 32 (7 generated)
tommycli
piman/bauerb: PTAL let me know what you think of this approach
5 years, 11 months ago (2015-01-13 21:25:24 UTC) #3
tommycli
By the way, this patch shouldn't change any functionality or behavior. It's a refactoring to ...
5 years, 11 months ago (2015-01-13 21:27:47 UTC) #4
Bernhard Bauer
Looks pretty good, mostly nits: https://codereview.chromium.org/849723002/diff/220001/content/public/renderer/render_frame.h File content/public/renderer/render_frame.h (right): https://codereview.chromium.org/849723002/diff/220001/content/public/renderer/render_frame.h#newcode89 content/public/renderer/render_frame.h:89: // plugin was found. ...
5 years, 11 months ago (2015-01-13 23:29:37 UTC) #5
piman
https://codereview.chromium.org/849723002/diff/220001/content/public/renderer/plugin_instance_throttler.h File content/public/renderer/plugin_instance_throttler.h (right): https://codereview.chromium.org/849723002/diff/220001/content/public/renderer/plugin_instance_throttler.h#newcode89 content/public/renderer/plugin_instance_throttler.h:89: void OnImageFlush(const SkBitmap* bitmap); Are you actually going to ...
5 years, 11 months ago (2015-01-14 00:09:33 UTC) #6
tommycli
bauerb/piman: Addressed your concerns below. Thanks for review! https://codereview.chromium.org/849723002/diff/220001/content/public/renderer/plugin_instance_throttler.h File content/public/renderer/plugin_instance_throttler.h (right): https://codereview.chromium.org/849723002/diff/220001/content/public/renderer/plugin_instance_throttler.h#newcode89 content/public/renderer/plugin_instance_throttler.h:89: void ...
5 years, 11 months ago (2015-01-14 01:45:00 UTC) #8
piman
Mostly nits, otherwise LGTM. https://codereview.chromium.org/849723002/diff/260001/content/public/renderer/plugin_instance_throttler.h File content/public/renderer/plugin_instance_throttler.h (right): https://codereview.chromium.org/849723002/diff/260001/content/public/renderer/plugin_instance_throttler.h#newcode62 content/public/renderer/plugin_instance_throttler.h:62: static PluginInstanceThrottler* Create(RenderFrame* frame, nit: ...
5 years, 11 months ago (2015-01-14 02:08:14 UTC) #9
tommycli
piman/bauerb: Addressed your comments below. Thanks! https://codereview.chromium.org/849723002/diff/260001/content/public/renderer/plugin_instance_throttler.h File content/public/renderer/plugin_instance_throttler.h (right): https://codereview.chromium.org/849723002/diff/260001/content/public/renderer/plugin_instance_throttler.h#newcode62 content/public/renderer/plugin_instance_throttler.h:62: static PluginInstanceThrottler* Create(RenderFrame* ...
5 years, 11 months ago (2015-01-14 18:43:26 UTC) #10
tommycli
thestig: May i have a review for chrome/renderer/chrome_content_renderer_client.cc? Thanks!
5 years, 11 months ago (2015-01-14 18:44:04 UTC) #12
piman
lgtm https://codereview.chromium.org/849723002/diff/340001/chrome/renderer/chrome_content_renderer_client.cc File chrome/renderer/chrome_content_renderer_client.cc (right): https://codereview.chromium.org/849723002/diff/340001/chrome/renderer/chrome_content_renderer_client.cc#newcode851 chrome/renderer/chrome_content_renderer_client.cc:851: render_frame, url, power_saver_mode).release()); nit: throttler = content::PluginInstanceThrottler::Create(...); should ...
5 years, 11 months ago (2015-01-14 19:15:43 UTC) #13
tommycli
piman: excellent, thank you! https://codereview.chromium.org/849723002/diff/340001/chrome/renderer/chrome_content_renderer_client.cc File chrome/renderer/chrome_content_renderer_client.cc (right): https://codereview.chromium.org/849723002/diff/340001/chrome/renderer/chrome_content_renderer_client.cc#newcode851 chrome/renderer/chrome_content_renderer_client.cc:851: render_frame, url, power_saver_mode).release()); On 2015/01/14 ...
5 years, 11 months ago (2015-01-14 19:22:06 UTC) #14
Lei Zhang
https://codereview.chromium.org/849723002/diff/360001/chrome/renderer/chrome_content_renderer_client.cc File chrome/renderer/chrome_content_renderer_client.cc (right): https://codereview.chromium.org/849723002/diff/360001/chrome/renderer/chrome_content_renderer_client.cc#newcode813 chrome/renderer/chrome_content_renderer_client.cc:813: if (status_value == ChromeViewHostMsg_GetPluginInfo_Status:: nit: can you pick one ...
5 years, 11 months ago (2015-01-14 23:49:33 UTC) #15
tommycli
thestig: Thank you for the fast review! https://codereview.chromium.org/849723002/diff/360001/chrome/renderer/chrome_content_renderer_client.cc File chrome/renderer/chrome_content_renderer_client.cc (right): https://codereview.chromium.org/849723002/diff/360001/chrome/renderer/chrome_content_renderer_client.cc#newcode813 chrome/renderer/chrome_content_renderer_client.cc:813: if (status_value ...
5 years, 11 months ago (2015-01-15 00:26:05 UTC) #16
Lei Zhang
https://codereview.chromium.org/849723002/diff/360001/chrome/renderer/chrome_content_renderer_client.cc File chrome/renderer/chrome_content_renderer_client.cc (right): https://codereview.chromium.org/849723002/diff/360001/chrome/renderer/chrome_content_renderer_client.cc#newcode813 chrome/renderer/chrome_content_renderer_client.cc:813: if (status_value == ChromeViewHostMsg_GetPluginInfo_Status:: On 2015/01/15 00:26:05, tommycli wrote: ...
5 years, 11 months ago (2015-01-15 01:18:38 UTC) #17
tommycli
thestig: I refactored the throttler's internal state variables based on your feedback. Thanks! https://codereview.chromium.org/849723002/diff/360001/chrome/renderer/chrome_content_renderer_client.cc File ...
5 years, 11 months ago (2015-01-15 23:19:33 UTC) #18
Lei Zhang
https://codereview.chromium.org/849723002/diff/440001/content/public/renderer/plugin_instance_throttler.h File content/public/renderer/plugin_instance_throttler.h (right): https://codereview.chromium.org/849723002/diff/440001/content/public/renderer/plugin_instance_throttler.h#newcode29 content/public/renderer/plugin_instance_throttler.h:29: // the plugin instance will never actually be throttled, ...
5 years, 11 months ago (2015-01-16 00:19:32 UTC) #19
tommycli
thestig: Thanks! https://codereview.chromium.org/849723002/diff/440001/content/public/renderer/plugin_instance_throttler.h File content/public/renderer/plugin_instance_throttler.h (right): https://codereview.chromium.org/849723002/diff/440001/content/public/renderer/plugin_instance_throttler.h#newcode29 content/public/renderer/plugin_instance_throttler.h:29: // the plugin instance will never actually ...
5 years, 11 months ago (2015-01-16 00:51:56 UTC) #20
Lei Zhang
https://codereview.chromium.org/849723002/diff/480001/components/plugins/renderer/plugin_placeholder.cc File components/plugins/renderer/plugin_placeholder.cc (right): https://codereview.chromium.org/849723002/diff/480001/components/plugins/renderer/plugin_placeholder.cc#newcode251 components/plugins/renderer/plugin_placeholder.cc:251: #if defined(ENABLE_PLUGINS) Can you see if this works for ...
5 years, 11 months ago (2015-01-16 01:09:58 UTC) #21
tommycli
thestig: thanks! https://codereview.chromium.org/849723002/diff/480001/components/plugins/renderer/plugin_placeholder.cc File components/plugins/renderer/plugin_placeholder.cc (right): https://codereview.chromium.org/849723002/diff/480001/components/plugins/renderer/plugin_placeholder.cc#newcode251 components/plugins/renderer/plugin_placeholder.cc:251: #if defined(ENABLE_PLUGINS) On 2015/01/16 01:09:58, Lei Zhang ...
5 years, 11 months ago (2015-01-16 01:26:10 UTC) #22
Lei Zhang
lgtm
5 years, 11 months ago (2015-01-16 01:33:46 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/849723002/500001
5 years, 11 months ago (2015-01-16 01:36:53 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/36445)
5 years, 11 months ago (2015-01-16 01:40:43 UTC) #27
Bernhard Bauer
lgtm
5 years, 11 months ago (2015-01-16 09:24:23 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/849723002/500001
5 years, 11 months ago (2015-01-16 09:24:55 UTC) #30
commit-bot: I haz the power
Committed patchset #25 (id:500001)
5 years, 11 months ago (2015-01-16 11:41:09 UTC) #31
commit-bot: I haz the power
5 years, 11 months ago (2015-01-16 11:42:49 UTC) #32
Message was sent while issue was closed.
Patchset 25 (id:??) landed as
https://crrev.com/e87227095477cea2725cc9d4cbaa49811455736c
Cr-Commit-Position: refs/heads/master@{#311873}

Powered by Google App Engine
This is Rietveld 408576698