Index: ppapi/proxy/host_dispatcher.cc |
diff --git a/ppapi/proxy/host_dispatcher.cc b/ppapi/proxy/host_dispatcher.cc |
index 69de02a6677c6f0407fd625f9c736f7f9e5a2880..8f3833f5ddff7fa8f6a8cec321b59911f77b60bb 100644 |
--- a/ppapi/proxy/host_dispatcher.cc |
+++ b/ppapi/proxy/host_dispatcher.cc |
@@ -61,8 +61,10 @@ |
HostDispatcher::HostDispatcher(PP_Module module, |
PP_GetInterface_Func local_get_interface, |
+ SyncMessageStatusReceiver* sync_status, |
const PpapiPermissions& permissions) |
: Dispatcher(local_get_interface, permissions), |
+ sync_status_(sync_status), |
pp_module_(module), |
ppb_proxy_(NULL), |
allow_plugin_reentrancy_(false) { |
@@ -92,6 +94,8 @@ |
if (!Dispatcher::InitWithChannel(delegate, peer_pid, channel_handle, |
is_client)) |
return false; |
+ AddIOThreadMessageFilter(sync_status_.get()); |
+ |
Send(new PpapiMsg_SetPreferences(preferences)); |
return true; |
} |
@@ -153,11 +157,9 @@ |
// destroys the plugin module and in turn the dispatcher. |
ScopedModuleReference scoped_ref(this); |
- FOR_EACH_OBSERVER(SyncMessageStatusObserver, sync_status_observer_list_, |
- BeginBlockOnSyncMessage()); |
+ sync_status_->BeginBlockOnSyncMessage(); |
bool result = Dispatcher::Send(msg); |
- FOR_EACH_OBSERVER(SyncMessageStatusObserver, sync_status_observer_list_, |
- EndBlockOnSyncMessage()); |
+ sync_status_->EndBlockOnSyncMessage(); |
return result; |
} else { |
@@ -236,16 +238,6 @@ |
if (iter->second) |
return proxied_interface; |
return NULL; |
-} |
- |
-void HostDispatcher::AddSyncMessageStatusObserver( |
- SyncMessageStatusObserver* obs) { |
- sync_status_observer_list_.AddObserver(obs); |
-} |
- |
-void HostDispatcher::RemoveSyncMessageStatusObserver( |
- SyncMessageStatusObserver* obs) { |
- sync_status_observer_list_.RemoveObserver(obs); |
} |
void HostDispatcher::AddFilter(IPC::Listener* listener) { |