diff options
author | jcampan@google.com <jcampan@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-12 01:25:41 +0000 |
---|---|---|
committer | jcampan@google.com <jcampan@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-12 01:25:41 +0000 |
commit | d65cab7ac310ea12c5d946ff40242a243ce911da (patch) | |
tree | fe3eaa4a4e6f14a7416c4b4da351e18cd34d34b2 /chrome/common/ipc_channel_proxy.cc | |
parent | 1a48f315b0ca5c26c4446070edfb5842ed06c8c7 (diff) | |
download | chromium_src-d65cab7ac310ea12c5d946ff40242a243ce911da.zip chromium_src-d65cab7ac310ea12c5d946ff40242a243ce911da.tar.gz chromium_src-d65cab7ac310ea12c5d946ff40242a243ce911da.tar.bz2 |
Enabling sync_channel in the browser to allow accessibility code making blocking calls. This replaces my previous CL that was somehow duplicating some of these functionalities.
BUG=None
TEST=Run the unit tests.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@691 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/ipc_channel_proxy.cc')
-rw-r--r-- | chrome/common/ipc_channel_proxy.cc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/chrome/common/ipc_channel_proxy.cc b/chrome/common/ipc_channel_proxy.cc index 9d6b473..2cddc8e 100644 --- a/chrome/common/ipc_channel_proxy.cc +++ b/chrome/common/ipc_channel_proxy.cc @@ -55,8 +55,7 @@ void ChannelProxy::Context::CreateChannel(const std::wstring& id, channel_ = new Channel(id, mode, this); } -// Called on the IPC::Channel thread -void ChannelProxy::Context::OnMessageReceived(const Message& message) { +bool ChannelProxy::Context::TryFilters(const Message& message) { #ifdef IPC_MESSAGE_LOG_ENABLED Logging* logger = Logging::current(); if (logger->Enabled()) @@ -69,9 +68,17 @@ void ChannelProxy::Context::OnMessageReceived(const Message& message) { if (logger->Enabled()) logger->OnPostDispatchMessage(message, channel_id_); #endif - return; + return true; } } + return false; +} + +// Called on the IPC::Channel thread +void ChannelProxy::Context::OnMessageReceived(const Message& message) { + // First give a chance to the filters to process this message. + if (TryFilters(message)) + return; // NOTE: This code relies on the listener's message loop not going away while // this thread is active. That should be a reasonable assumption, but it @@ -217,7 +224,6 @@ ChannelProxy::ChannelProxy(const std::wstring& channel_id, Channel::Mode mode, } ChannelProxy::ChannelProxy(const std::wstring& channel_id, Channel::Mode mode, - Channel::Listener* listener, MessageFilter* filter, MessageLoop* ipc_thread, Context* context, bool create_pipe_now) : context_(context) { |