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

Unified Diff: ppapi/proxy/host_dispatcher.cc

Issue 601923003: Revert of PPAPI: Never re-enter JavaScript for PostMessage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « ppapi/proxy/host_dispatcher.h ('k') | ppapi/proxy/ppapi_proxy_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « ppapi/proxy/host_dispatcher.h ('k') | ppapi/proxy/ppapi_proxy_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698