| Index: ppapi/proxy/host_dispatcher.cc
|
| diff --git a/ppapi/proxy/host_dispatcher.cc b/ppapi/proxy/host_dispatcher.cc
|
| index 8f3833f5ddff7fa8f6a8cec321b59911f77b60bb..9b357996d73a60157adce9309388b09b26f348f1 100644
|
| --- a/ppapi/proxy/host_dispatcher.cc
|
| +++ b/ppapi/proxy/host_dispatcher.cc
|
| @@ -61,10 +61,10 @@ class BoolRestorer {
|
|
|
| HostDispatcher::HostDispatcher(PP_Module module,
|
| PP_GetInterface_Func local_get_interface,
|
| - SyncMessageStatusReceiver* sync_status,
|
| + scoped_refptr<IPC::MessageFilter> sync_filter,
|
| const PpapiPermissions& permissions)
|
| : Dispatcher(local_get_interface, permissions),
|
| - sync_status_(sync_status),
|
| + sync_filter_(sync_filter),
|
| pp_module_(module),
|
| ppb_proxy_(NULL),
|
| allow_plugin_reentrancy_(false) {
|
| @@ -94,7 +94,7 @@ bool HostDispatcher::InitHostWithChannel(
|
| if (!Dispatcher::InitWithChannel(delegate, peer_pid, channel_handle,
|
| is_client))
|
| return false;
|
| - AddIOThreadMessageFilter(sync_status_.get());
|
| + AddIOThreadMessageFilter(sync_filter_);
|
|
|
| Send(new PpapiMsg_SetPreferences(preferences));
|
| return true;
|
| @@ -157,9 +157,11 @@ bool HostDispatcher::Send(IPC::Message* msg) {
|
| // destroys the plugin module and in turn the dispatcher.
|
| ScopedModuleReference scoped_ref(this);
|
|
|
| - sync_status_->BeginBlockOnSyncMessage();
|
| + FOR_EACH_OBSERVER(SyncMessageStatusObserver, sync_status_observer_list_,
|
| + BeginBlockOnSyncMessage());
|
| bool result = Dispatcher::Send(msg);
|
| - sync_status_->EndBlockOnSyncMessage();
|
| + FOR_EACH_OBSERVER(SyncMessageStatusObserver, sync_status_observer_list_,
|
| + EndBlockOnSyncMessage());
|
|
|
| return result;
|
| } else {
|
| @@ -240,6 +242,16 @@ const void* HostDispatcher::GetProxiedInterface(const std::string& iface_name) {
|
| 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) {
|
| filters_.push_back(listener);
|
| }
|
|
|