summaryrefslogtreecommitdiffstats
path: root/chrome/nacl
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-24 06:19:28 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-24 06:19:28 +0000
commita95986a837fc86e079b5c6dac357636478b50092 (patch)
tree66a32009250791e64741216cdd6c21ecf1ff7f86 /chrome/nacl
parent125a7ba65ad10ace9edcf36d6943ce9ae2bdc1d6 (diff)
downloadchromium_src-a95986a837fc86e079b5c6dac357636478b50092.zip
chromium_src-a95986a837fc86e079b5c6dac357636478b50092.tar.gz
chromium_src-a95986a837fc86e079b5c6dac357636478b50092.tar.bz2
Make IPC::Channel::Listener:OnMessageReceived have a return value indicating whether a message was processed or not.
TBR=brettw Review URL: http://codereview.chromium.org/5978003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70139 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/nacl')
-rw-r--r--chrome/nacl/broker_thread.cc5
-rw-r--r--chrome/nacl/broker_thread.h2
-rw-r--r--chrome/nacl/nacl_thread.cc5
-rw-r--r--chrome/nacl/nacl_thread.h2
4 files changed, 10 insertions, 4 deletions
diff --git a/chrome/nacl/broker_thread.cc b/chrome/nacl/broker_thread.cc
index b0cdba5..984acb3 100644
--- a/chrome/nacl/broker_thread.cc
+++ b/chrome/nacl/broker_thread.cc
@@ -28,12 +28,15 @@ NaClBrokerThread* NaClBrokerThread::current() {
return static_cast<NaClBrokerThread*>(ChildThread::current());
}
-void NaClBrokerThread::OnControlMessageReceived(const IPC::Message& msg) {
+bool NaClBrokerThread::OnControlMessageReceived(const IPC::Message& msg) {
+ bool handled = true;
IPC_BEGIN_MESSAGE_MAP(NaClBrokerThread, msg)
IPC_MESSAGE_HANDLER(NaClProcessMsg_LaunchLoaderThroughBroker,
OnLaunchLoaderThroughBroker)
IPC_MESSAGE_HANDLER(NaClProcessMsg_StopBroker, OnStopBroker)
+ IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
+ return handled;
}
void NaClBrokerThread::OnLaunchLoaderThroughBroker(
diff --git a/chrome/nacl/broker_thread.h b/chrome/nacl/broker_thread.h
index 6590635..8b2d7c5 100644
--- a/chrome/nacl/broker_thread.h
+++ b/chrome/nacl/broker_thread.h
@@ -26,7 +26,7 @@ class NaClBrokerThread : public ChildThread {
virtual void OnChannelConnected(int32 peer_pid);
private:
- virtual void OnControlMessageReceived(const IPC::Message& msg);
+ virtual bool OnControlMessageReceived(const IPC::Message& msg);
void OnLaunchLoaderThroughBroker(const std::wstring& loader_channel_id);
void OnShareBrowserHandle(int browser_handle);
void OnStopBroker();
diff --git a/chrome/nacl/nacl_thread.cc b/chrome/nacl/nacl_thread.cc
index 15c25b9..3ea0f82 100644
--- a/chrome/nacl/nacl_thread.cc
+++ b/chrome/nacl/nacl_thread.cc
@@ -76,10 +76,13 @@ NaClThread* NaClThread::current() {
return static_cast<NaClThread*>(ChildThread::current());
}
-void NaClThread::OnControlMessageReceived(const IPC::Message& msg) {
+bool NaClThread::OnControlMessageReceived(const IPC::Message& msg) {
+ bool handled = true;
IPC_BEGIN_MESSAGE_MAP(NaClThread, msg)
IPC_MESSAGE_HANDLER(NaClProcessMsg_Start, OnStartSelLdr)
+ IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
+ return handled;
}
void NaClThread::OnStartSelLdr(std::vector<nacl::FileDescriptor> handles) {
diff --git a/chrome/nacl/nacl_thread.h b/chrome/nacl/nacl_thread.h
index f87fc969..b330794 100644
--- a/chrome/nacl/nacl_thread.h
+++ b/chrome/nacl/nacl_thread.h
@@ -20,7 +20,7 @@ class NaClThread : public ChildThread {
static NaClThread* current();
private:
- virtual void OnControlMessageReceived(const IPC::Message& msg);
+ virtual bool OnControlMessageReceived(const IPC::Message& msg);
void OnStartSelLdr(std::vector<nacl::FileDescriptor> handles);
int debug_enabled_;