Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / ppapi / proxy / dispatcher.cc
index 3b18932..3c038a3 100644 (file)
 #include "ppapi/proxy/ppapi_messages.h"
 #include "ppapi/proxy/var_serialization_rules.h"
 
+namespace IPC {
+class MessageFilter;
+}
+
 namespace ppapi {
 namespace proxy {
 
@@ -26,10 +30,6 @@ Dispatcher::Dispatcher(PP_GetInterface_Func local_get_interface,
 Dispatcher::~Dispatcher() {
 }
 
-void Dispatcher::AddFilter(IPC::Listener* listener) {
-  filters_.push_back(listener);
-}
-
 InterfaceProxy* Dispatcher::GetInterfaceProxy(ApiID id) {
   InterfaceProxy* proxy = proxies_[id].get();
   if (!proxy) {
@@ -47,16 +47,12 @@ InterfaceProxy* Dispatcher::GetInterfaceProxy(ApiID id) {
   return proxy;
 }
 
-base::MessageLoopProxy* Dispatcher::GetIPCMessageLoop() {
-  return delegate()->GetIPCMessageLoop();
-}
-
 void Dispatcher::AddIOThreadMessageFilter(
-    IPC::ChannelProxy::MessageFilter* filter) {
+    scoped_refptr<IPC::MessageFilter> filter) {
   // Our filter is refcounted. The channel will call the destruct method on the
   // filter when the channel is done with it, so the corresponding Release()
   // happens there.
-  channel()->AddFilter(filter);
+  channel()->AddFilter(filter.get());
 }
 
 bool Dispatcher::OnMessageReceived(const IPC::Message& msg) {