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

Issue 1124173008: Plugin Power Saver: Unthrottle dynamically sized plugins correctly. (Closed)

Created:
5 years, 7 months ago by tommycli
Modified:
5 years, 6 months ago
CC:
chromium-reviews, mkwst+moarreviews-renderer_chromium.org, darin-cc_chromium.org, jam, asvitkine+watch_chromium.org, 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: Unthrottle dynamically sized plugins correctly. This is to unthrottle plugins that start small but then are resized by Javascript to be large. Notably it fixes the weatherspark.com use case. (Resize your browser window to be 1270x760 ish to test) BUG=489376 Committed: https://crrev.com/4f7f69cb743e3b1e7572c5b04d6d7af4c498d254 Cr-Commit-Position: refs/heads/master@{#333790}

Patch Set 1 #

Patch Set 2 : merge #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : add defines #

Total comments: 14

Patch Set 6 : one more ifdef i hope #

Patch Set 7 : #

Patch Set 8 : #

Total comments: 6

Patch Set 9 : #

Patch Set 10 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+121 lines, -8 lines) Patch
M chrome/browser/plugins/plugin_power_saver_browsertest.cc View 1 2 3 1 chunk +20 lines, -1 line 0 comments Download
M components/plugins/renderer/loadable_plugin_placeholder.h View 1 2 3 4 5 6 7 8 4 chunks +12 lines, -0 lines 0 comments Download
M components/plugins/renderer/loadable_plugin_placeholder.cc View 1 2 3 4 5 6 7 8 5 chunks +61 lines, -0 lines 0 comments Download
M components/plugins/renderer/webview_plugin.h View 2 chunks +7 lines, -0 lines 0 comments Download
M components/plugins/renderer/webview_plugin.cc View 1 1 chunk +3 lines, -0 lines 0 comments Download
M content/public/renderer/plugin_instance_throttler.h View 1 2 chunks +4 lines, -0 lines 0 comments Download
M content/renderer/pepper/plugin_instance_throttler_impl.cc View 1 2 3 4 5 6 2 chunks +11 lines, -0 lines 0 comments Download
M content/renderer/pepper/plugin_power_saver_helper.cc View 1 3 chunks +2 lines, -7 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 37 (15 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1124173008/60001
5 years, 6 months ago (2015-06-05 21:58:26 UTC) #4
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_chromium_gn_compile_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_chromium_gn_compile_rel/builds/95434)
5 years, 6 months ago (2015-06-05 22:15:21 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1124173008/80001
5 years, 6 months ago (2015-06-05 22:21:33 UTC) #8
tommycli
groby: This hacky hack does fix the weatherspark case. It has to work around the ...
5 years, 6 months ago (2015-06-05 22:23:05 UTC) #9
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: cast_shell_linux on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linux/builds/17754)
5 years, 6 months ago (2015-06-05 22:41:08 UTC) #11
groby-ooo-7-16
https://codereview.chromium.org/1124173008/diff/80001/components/plugins/renderer/loadable_plugin_placeholder.cc File components/plugins/renderer/loadable_plugin_placeholder.cc (right): https://codereview.chromium.org/1124173008/diff/80001/components/plugins/renderer/loadable_plugin_placeholder.cc#newcode51 components/plugins/renderer/loadable_plugin_placeholder.cc:51: // TODO(tommycli): After an unthrottling size update, re-check the ...
5 years, 6 months ago (2015-06-05 23:03:45 UTC) #12
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1124173008/100001
5 years, 6 months ago (2015-06-05 23:07:50 UTC) #14
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1124173008/140001
5 years, 6 months ago (2015-06-05 23:39:10 UTC) #16
tommycli
groby: Made some changes based on your suggestions below. https://codereview.chromium.org/1124173008/diff/80001/components/plugins/renderer/loadable_plugin_placeholder.cc File components/plugins/renderer/loadable_plugin_placeholder.cc (right): https://codereview.chromium.org/1124173008/diff/80001/components/plugins/renderer/loadable_plugin_placeholder.cc#newcode51 components/plugins/renderer/loadable_plugin_placeholder.cc:51: ...
5 years, 6 months ago (2015-06-06 01:23:22 UTC) #17
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 6 months ago (2015-06-06 01:42:59 UTC) #19
tommycli
bauerb, piman, isherman: PTAL, thanks!
5 years, 6 months ago (2015-06-09 23:49:40 UTC) #22
Ilya Sherman
histograms.xml lgtm
5 years, 6 months ago (2015-06-09 23:51:27 UTC) #23
piman
LGTM for content/, I didn't review the rest
5 years, 6 months ago (2015-06-10 00:50:55 UTC) #24
Bernhard Bauer
LGTM w/ nits: https://codereview.chromium.org/1124173008/diff/140001/components/plugins/renderer/loadable_plugin_placeholder.cc File components/plugins/renderer/loadable_plugin_placeholder.cc (right): https://codereview.chromium.org/1124173008/diff/140001/components/plugins/renderer/loadable_plugin_placeholder.cc#newcode49 components/plugins/renderer/loadable_plugin_placeholder.cc:49: namespace { Nit: Anonymous namespace isn't ...
5 years, 6 months ago (2015-06-10 11:13:24 UTC) #25
tommycli
isherman, piman, bauerb: thanks all for quick review! https://codereview.chromium.org/1124173008/diff/140001/components/plugins/renderer/loadable_plugin_placeholder.cc File components/plugins/renderer/loadable_plugin_placeholder.cc (right): https://codereview.chromium.org/1124173008/diff/140001/components/plugins/renderer/loadable_plugin_placeholder.cc#newcode49 components/plugins/renderer/loadable_plugin_placeholder.cc:49: namespace ...
5 years, 6 months ago (2015-06-10 18:55:52 UTC) #26
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1124173008/180001
5 years, 6 months ago (2015-06-10 18:57:20 UTC) #29
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 6 months ago (2015-06-10 20:20:45 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1124173008/180001
5 years, 6 months ago (2015-06-10 20:31:13 UTC) #33
commit-bot: I haz the power
Committed patchset #10 (id:180001)
5 years, 6 months ago (2015-06-10 20:36:26 UTC) #34
commit-bot: I haz the power
Patchset 10 (id:??) landed as https://crrev.com/4f7f69cb743e3b1e7572c5b04d6d7af4c498d254 Cr-Commit-Position: refs/heads/master@{#333790}
5 years, 6 months ago (2015-06-10 20:37:20 UTC) #35
groby-ooo-7-16
https://codereview.chromium.org/1124173008/diff/140001/components/plugins/renderer/loadable_plugin_placeholder.h File components/plugins/renderer/loadable_plugin_placeholder.h (right): https://codereview.chromium.org/1124173008/diff/140001/components/plugins/renderer/loadable_plugin_placeholder.h#newcode88 components/plugins/renderer/loadable_plugin_placeholder.h:88: #if defined(ENABLE_PLUGINS) Question - why do we need to ...
5 years, 6 months ago (2015-06-11 23:32:56 UTC) #36
tommycli
5 years, 6 months ago (2015-06-11 23:39:21 UTC) #37
Message was sent while issue was closed.
https://codereview.chromium.org/1124173008/diff/140001/components/plugins/ren...
File components/plugins/renderer/loadable_plugin_placeholder.h (right):

https://codereview.chromium.org/1124173008/diff/140001/components/plugins/ren...
components/plugins/renderer/loadable_plugin_placeholder.h:88: #if
defined(ENABLE_PLUGINS)
On 2015/06/11 23:32:56, groby wrote:
> Question - why do we need to ENABLE_PLUGINS for *parts* of the plugin
> placeholder? Shouldn't the PPH not exist if we don't have plugins?

Because previously a ChromePluginPlaceholder was used on Android also even
though ENABLE_PLUGINS is false.

This was lame and finally addressed by this refactor:
https://codereview.chromium.org/1161923004/

Now LoadablePluginPlaceholder and ChromePluginPlaceholder are only compiled if
ENABLE_PLUGINS is on, and these ifdefs have been removed

Powered by Google App Engine
This is Rietveld 408576698