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

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..4e6cbc10297230a017108908a214ddb1e2bfd5bb 100644
--- a/content/renderer/pepper/pepper_webplugin_impl.cc
+++ b/content/renderer/pepper/pepper_webplugin_impl.cc
@@ -12,6 +12,7 @@
#include "content/public/renderer/content_renderer_client.h"
#include "content/renderer/pepper/message_channel.h"
#include "content/renderer/pepper/pepper_plugin_instance_impl.h"
+#include "content/renderer/pepper/plugin_instance_throttler_impl.h"
#include "content/renderer/pepper/plugin_module.h"
#include "content/renderer/pepper/v8object_var.h"
#include "content/renderer/render_frame_impl.h"
@@ -59,10 +60,10 @@ PepperWebPluginImpl::PepperWebPluginImpl(
PluginModule* plugin_module,
const WebPluginParams& params,
RenderFrameImpl* render_frame,
- RenderFrame::PluginPowerSaverMode power_saver_mode)
+ scoped_ptr<PluginInstanceThrottlerImpl> throttler)
: init_data_(new InitData()),
full_frame_(params.loadManually),
- power_saver_mode_(power_saver_mode),
+ throttler_(throttler.Pass()),
instance_object_(PP_MakeUndefined()),
container_(NULL) {
DCHECK(plugin_module);
@@ -96,7 +97,7 @@ bool PepperWebPluginImpl::initialize(WebPluginContainer* container) {
bool success =
instance_->Initialize(init_data_->arg_names, init_data_->arg_values,
- full_frame_, power_saver_mode_);
+ full_frame_, throttler_.Pass());
if (!success) {
instance_->Delete();
instance_ = NULL;
« no previous file with comments | « content/renderer/pepper/pepper_webplugin_impl.h ('k') | content/renderer/pepper/plugin_instance_throttler_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698