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

Unified Diff: content/renderer/pepper/pepper_webplugin_impl.cc

Issue 849723002: Plugin Power Saver: Make PepperPluginInstanceThrottler interface public. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
Index: content/renderer/pepper/pepper_webplugin_impl.cc
diff --git a/content/renderer/pepper/pepper_webplugin_impl.cc b/content/renderer/pepper/pepper_webplugin_impl.cc
index 8297ae09a0ca978e99d75fbbea6b5dba528ffbc5..0feae075bdf0c4b01430f29da135122ecc3ca719 100644
--- a/content/renderer/pepper/pepper_webplugin_impl.cc
+++ b/content/renderer/pepper/pepper_webplugin_impl.cc
@@ -55,14 +55,13 @@ struct PepperWebPluginImpl::InitData {
GURL url;
};
-PepperWebPluginImpl::PepperWebPluginImpl(
- PluginModule* plugin_module,
- const WebPluginParams& params,
- RenderFrameImpl* render_frame,
- RenderFrame::PluginPowerSaverMode power_saver_mode)
+PepperWebPluginImpl::PepperWebPluginImpl(PluginModule* plugin_module,
+ const WebPluginParams& params,
+ RenderFrameImpl* render_frame,
+ PluginInstanceThrottler* throttler)
: init_data_(new InitData()),
full_frame_(params.loadManually),
- power_saver_mode_(power_saver_mode),
+ throttler_(throttler),
instance_object_(PP_MakeUndefined()),
container_(NULL) {
DCHECK(plugin_module);
@@ -94,9 +93,8 @@ bool PepperWebPluginImpl::initialize(WebPluginContainer* container) {
// Enable script objects for this plugin.
container->allowScriptObjects();
- bool success =
- instance_->Initialize(init_data_->arg_names, init_data_->arg_values,
- full_frame_, power_saver_mode_);
+ bool success = instance_->Initialize(
+ init_data_->arg_names, init_data_->arg_values, full_frame_, throttler_);
if (!success) {
instance_->Delete();
instance_ = NULL;

Powered by Google App Engine
This is Rietveld 408576698