Index: content/renderer/pepper/pepper_plugin_instance_impl.cc |
diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.cc b/content/renderer/pepper/pepper_plugin_instance_impl.cc |
index 97a85c90f253966dd8e964bd7232cfe7d199e90f..bb5788fe2e499671aea8a9195dda734371b9159c 100644 |
--- a/content/renderer/pepper/pepper_plugin_instance_impl.cc |
+++ b/content/renderer/pepper/pepper_plugin_instance_impl.cc |
@@ -395,7 +395,8 @@ PepperPluginInstanceImpl* PepperPluginInstanceImpl::Create( |
RenderFrameImpl* render_frame, |
PluginModule* module, |
WebPluginContainer* container, |
- const GURL& plugin_url) { |
+ const GURL& plugin_url, |
+ const GURL& top_frame_url) { |
base::Callback<const void*(const char*)> get_plugin_interface_func = |
base::Bind(&PluginModule::GetPluginInterface, module); |
PPP_Instance_Combined* ppp_instance_combined = |
@@ -407,7 +408,8 @@ PepperPluginInstanceImpl* PepperPluginInstanceImpl::Create( |
module, |
ppp_instance_combined, |
container, |
- plugin_url); |
+ plugin_url, |
+ top_frame_url); |
} |
PepperPluginInstanceImpl::ExternalDocumentLoader::ExternalDocumentLoader() |
@@ -478,7 +480,8 @@ PepperPluginInstanceImpl::PepperPluginInstanceImpl( |
PluginModule* module, |
ppapi::PPP_Instance_Combined* instance_interface, |
WebPluginContainer* container, |
- const GURL& plugin_url) |
+ const GURL& plugin_url, |
+ const GURL& top_frame_url) |
: RenderFrameObserver(render_frame), |
render_frame_(render_frame), |
module_(module), |
@@ -591,7 +594,8 @@ PepperPluginInstanceImpl::PepperPluginInstanceImpl( |
CommandLine::ForCurrentProcess()->HasSwitch( |
switches::kEnablePluginPowerSaver); |
- if (power_saver_enabled_) { |
+ if (power_saver_enabled_ && |
+ plugin_url.GetOrigin() != top_frame_url.GetOrigin()) { |
throttler_.reset(new PepperPluginInstanceThrottler( |
base::Bind(&PepperPluginInstanceImpl::SetPluginThrottled, |
weak_factory_.GetWeakPtr(), true /* throttled */))); |