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

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

Issue 1497623002: Plugin Power Saver: Improve Poster behavior for essential plugins. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/plugins/power_saver_info.h » ('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 b35d3e54bbe364daad4a209d633ed9688afac362..7f7cdfd78e62315bba68abdf41820d0b282ec9eb 100644
--- a/chrome/renderer/plugins/plugin_preroller.cc
+++ b/chrome/renderer/plugins/plugin_preroller.cc
@@ -7,6 +7,7 @@
#include "base/base64.h"
#include "chrome/grit/renderer_resources.h"
#include "chrome/renderer/plugins/chrome_plugin_placeholder.h"
+#include "chrome/renderer/plugins/power_saver_info.h"
#include "third_party/WebKit/public/platform/WebRect.h"
#include "third_party/WebKit/public/web/WebElement.h"
#include "third_party/WebKit/public/web/WebPlugin.h"
@@ -58,16 +59,16 @@ 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();
+ PowerSaverInfo power_saver_info;
+ power_saver_info.power_saver_enabled = true;
+ power_saver_info.poster_attribute = keyframe_data_url_.spec();
+ power_saver_info.custom_poster_size = throttler_->GetSize();
ChromePluginPlaceholder* placeholder =
ChromePluginPlaceholder::CreateBlockedPlugin(
render_frame(), frame_, params_, info_, identifier_, name_,
- IDR_PLUGIN_POSTER_HTML, message_, poster_info);
+ IDR_PLUGIN_POSTER_HTML, message_, power_saver_info);
placeholder->SetPremadePlugin(throttler_);
- placeholder->set_power_saver_enabled(true);
placeholder->AllowLoading();
blink::WebPluginContainer* container =
« no previous file with comments | « chrome/renderer/plugins/chrome_plugin_placeholder.cc ('k') | chrome/renderer/plugins/power_saver_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698