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

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

Issue 929483004: Plugin Power Saver: Throttled Plugins should block TCPSocket reads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « content/common/view_messages.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4d4dec4e7a80e3b8becffa3051198dbd66443a33..b7c64681ddd6d15230bff20a978921cb40737cc1 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) {
« no previous file with comments | « content/common/view_messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698