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

Unified Diff: ppapi/proxy/plugin_globals.cc

Issue 869883003: Never lock the Pepper proxy lock on the IO thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: some pre-review cleanup 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: ppapi/proxy/plugin_globals.cc
diff --git a/ppapi/proxy/plugin_globals.cc b/ppapi/proxy/plugin_globals.cc
index 6bb9c75860aca4bf94d8be21b6c98de48e8a2911..25db64e97c17e4e024497836bfaa450c3d17fcfc 100644
--- a/ppapi/proxy/plugin_globals.cc
+++ b/ppapi/proxy/plugin_globals.cc
@@ -9,10 +9,12 @@
#include "ipc/ipc_message.h"
#include "ipc/ipc_sender.h"
#include "ppapi/proxy/plugin_dispatcher.h"
+#include "ppapi/proxy/plugin_message_filter.h"
#include "ppapi/proxy/plugin_proxy_delegate.h"
#include "ppapi/proxy/ppapi_messages.h"
#include "ppapi/proxy/ppb_message_loop_proxy.h"
#include "ppapi/proxy/resource_reply_thread_registrar.h"
+#include "ppapi/proxy/udp_socket_filter.h"
#include "ppapi/shared_impl/ppapi_constants.h"
#include "ppapi/shared_impl/proxy_lock.h"
#include "ppapi/thunk/enter.h"
@@ -57,6 +59,7 @@ PluginGlobals::PluginGlobals()
callback_tracker_(new CallbackTracker),
resource_reply_thread_registrar_(
new ResourceReplyThreadRegistrar(GetMainThreadMessageLoop())),
+ udp_socket_filter_(new UDPSocketFilter()),
plugin_recently_active_(false),
keepalive_throttle_interval_milliseconds_(
ppapi::kKeepaliveThrottleIntervalDefaultMilliseconds),
@@ -236,6 +239,11 @@ MessageLoopResource* PluginGlobals::loop_for_main_thread() {
return loop_for_main_thread_.get();
}
+void PluginGlobals::RegisterResourceMessageFilters(
+ ppapi::proxy::PluginMessageFilter* plugin_filter) {
+ plugin_filter->AddResourceMessageFilter(udp_socket_filter_.get());
+}
+
void PluginGlobals::set_keepalive_throttle_interval_milliseconds(unsigned i) {
keepalive_throttle_interval_milliseconds_ = i;
}

Powered by Google App Engine
This is Rietveld 408576698