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

Unified Diff: chrome/renderer/plugins/plugin_preroller.cc

Issue 1015023002: Plugin Power Saver: Throttle 'large' plugins that appear small. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/plugins/chrome_plugin_placeholder.cc ('k') | chrome/renderer/resources/plugin_poster.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/plugins/plugin_preroller.cc
diff --git a/chrome/renderer/plugins/plugin_preroller.cc b/chrome/renderer/plugins/plugin_preroller.cc
index a98e77738da7197950fa75940b9b1f579f0c6a98..2d42f4e3eca049bd48c7e29c5d78652c6bc7c5e4 100644
--- a/chrome/renderer/plugins/plugin_preroller.cc
+++ b/chrome/renderer/plugins/plugin_preroller.cc
@@ -58,10 +58,14 @@ void PluginPreroller::OnThrottleStateChange() {
if (!throttler_->IsThrottled())
return;
+ PlaceholderPosterInfo poster_info;
+ poster_info.poster_attribute = keyframe_data_url_.spec();
+ poster_info.custom_poster_size = throttler_->GetSize();
+
ChromePluginPlaceholder* placeholder =
ChromePluginPlaceholder::CreateBlockedPlugin(
render_frame(), frame_, params_, info_, identifier_, name_,
- IDR_PLUGIN_POSTER_HTML, message_, keyframe_data_url_.spec(), GURL());
+ IDR_PLUGIN_POSTER_HTML, message_, poster_info);
placeholder->SetPremadePlugin(throttler_);
placeholder->set_power_saver_enabled(true);
placeholder->set_allow_loading(true);
« no previous file with comments | « chrome/renderer/plugins/chrome_plugin_placeholder.cc ('k') | chrome/renderer/resources/plugin_poster.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698