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

Unified Diff: content/browser/renderer_host/render_message_filter.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
Index: content/browser/renderer_host/render_message_filter.cc
diff --git a/content/browser/renderer_host/render_message_filter.cc b/content/browser/renderer_host/render_message_filter.cc
index c208323a63c578146f321da8d4863186311f198e..587c49e063247c836e912f8bc1cd0a9ba222db97 100644
--- a/content/browser/renderer_host/render_message_filter.cc
+++ b/content/browser/renderer_host/render_message_filter.cc
@@ -395,6 +395,8 @@ bool RenderMessageFilter::OnMessageReceived(const IPC::Message& message) {
OnDidDeleteOutOfProcessPepperInstance)
IPC_MESSAGE_HANDLER(ViewHostMsg_OpenChannelToPpapiBroker,
OnOpenChannelToPpapiBroker)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_PluginInstanceThrottleStateChange,
+ OnPluginInstanceThrottleStateChange)
#endif
#if defined(OS_MACOSX)
IPC_MESSAGE_HANDLER_GENERIC(ViewHostMsg_SwapCompositorFrame,
@@ -817,6 +819,15 @@ void RenderMessageFilter::OnOpenChannelToPpapiBroker(
path,
new OpenChannelToPpapiBrokerCallback(this, routing_id));
}
+
+void RenderMessageFilter::OnPluginInstanceThrottleStateChange(
+ int plugin_child_id,
+ int32 pp_instance,
+ bool is_throttled) {
+ // Feature is only implemented for non-external Plugins.
+ PpapiPluginProcessHost::OnPluginInstanceThrottleStateChange(
+ plugin_child_id, pp_instance, is_throttled);
+}
#endif // defined(ENABLE_PLUGINS)
void RenderMessageFilter::OnGenerateRoutingID(int* route_id) {

Powered by Google App Engine
This is Rietveld 408576698