summaryrefslogtreecommitdiffstats
path: root/content/renderer/pepper/pepper_plugin_instance_impl.cc
diff options
context:
space:
mode:
authortommycli <tommycli@chromium.org>2015-02-18 17:46:20 -0800
committerCommit bot <commit-bot@chromium.org>2015-02-19 01:47:04 +0000
commitc7634dec83f331accdb94d455cf0a53ddd3bd98b (patch)
tree2cc4f75534e6855134aded8e533191bbf907dc71 /content/renderer/pepper/pepper_plugin_instance_impl.cc
parentec67fa44fd4e05861a9603d9ae7ad62a4f313c7f (diff)
downloadchromium_src-c7634dec83f331accdb94d455cf0a53ddd3bd98b.zip
chromium_src-c7634dec83f331accdb94d455cf0a53ddd3bd98b.tar.gz
chromium_src-c7634dec83f331accdb94d455cf0a53ddd3bd98b.tar.bz2
Plugin Power Saver: Throttled Plugins should block TCPSocket reads.
BUG=458687, 403800 Review URL: https://codereview.chromium.org/929483004 Cr-Commit-Position: refs/heads/master@{#316963}
Diffstat (limited to 'content/renderer/pepper/pepper_plugin_instance_impl.cc')
-rw-r--r--content/renderer/pepper/pepper_plugin_instance_impl.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.cc b/content/renderer/pepper/pepper_plugin_instance_impl.cc
index 4d4dec4..b7c6468 100644
--- a/content/renderer/pepper/pepper_plugin_instance_impl.cc
+++ b/content/renderer/pepper/pepper_plugin_instance_impl.cc
@@ -22,6 +22,7 @@
#include "content/common/content_constants_internal.h"
#include "content/common/frame_messages.h"
#include "content/common/input/web_input_event_traits.h"
+#include "content/common/view_messages.h"
#include "content/public/common/content_constants.h"
#include "content/public/common/page_zoom.h"
#include "content/public/renderer/content_renderer_client.h"
@@ -2048,6 +2049,10 @@ void PepperPluginInstanceImpl::OnDestruct() { render_frame_ = NULL; }
void PepperPluginInstanceImpl::OnThrottleStateChange() {
SendDidChangeView();
+
+ bool is_throttled = throttler_->IsThrottled();
+ render_frame()->Send(new ViewHostMsg_PluginInstanceThrottleStateChange(
+ module_->GetPluginChildId(), pp_instance_, is_throttled));
}
void PepperPluginInstanceImpl::OnHiddenForPlaceholder(bool hidden) {