Skip to content
Snippets Groups Projects
Commit abac9873 authored by jam@chromium.org's avatar jam@chromium.org
Browse files

Make a few more places use bool for OnMessageReceived.

TBR=brettw
Review URL: http://codereview.chromium.org/6005006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70141 0039d316-1c4b-4281-b951-d872f2087c98
parent 52617df3
No related branches found
No related tags found
No related merge requests found
...@@ -19,8 +19,9 @@ bool TestSink::Send(IPC::Message* message) { ...@@ -19,8 +19,9 @@ bool TestSink::Send(IPC::Message* message) {
return true; return true;
} }
void TestSink::OnMessageReceived(const Message& msg) { bool TestSink::OnMessageReceived(const Message& msg) {
messages_.push_back(Message(msg)); messages_.push_back(Message(msg));
return true;
} }
void TestSink::ClearMessages() { void TestSink::ClearMessages() {
......
...@@ -54,7 +54,7 @@ class TestSink : public IPC::Channel { ...@@ -54,7 +54,7 @@ class TestSink : public IPC::Channel {
// Used by the source of the messages to send the message to the sink. This // Used by the source of the messages to send the message to the sink. This
// will make a copy of the message and store it in the list. // will make a copy of the message and store it in the list.
void OnMessageReceived(const Message& msg); bool OnMessageReceived(const Message& msg);
// Returns the number of messages in the queue. // Returns the number of messages in the queue.
size_t message_count() const { return messages_.size(); } size_t message_count() const { return messages_.size(); }
......
...@@ -48,7 +48,7 @@ class TabProxy : public AutomationResourceProxy, ...@@ -48,7 +48,7 @@ class TabProxy : public AutomationResourceProxy,
public: public:
class TabProxyDelegate { class TabProxyDelegate {
public: public:
virtual void OnMessageReceived(TabProxy* tab, const IPC::Message& msg) {} virtual bool OnMessageReceived(TabProxy* tab, const IPC::Message& msg) {}
virtual void OnChannelError(TabProxy* tab) {} virtual void OnChannelError(TabProxy* tab) {}
protected: protected:
......
...@@ -1168,19 +1168,20 @@ bool ChromeFrameAutomationClient::ProcessUrlRequestMessage(TabProxy* tab, ...@@ -1168,19 +1168,20 @@ bool ChromeFrameAutomationClient::ProcessUrlRequestMessage(TabProxy* tab,
// kind of beings. // kind of beings.
// By default we marshal the IPC message to the main/GUI thread and from there // By default we marshal the IPC message to the main/GUI thread and from there
// we safely invoke chrome_frame_delegate_->OnMessageReceived(msg). // we safely invoke chrome_frame_delegate_->OnMessageReceived(msg).
void ChromeFrameAutomationClient::OnMessageReceived(TabProxy* tab, bool ChromeFrameAutomationClient::OnMessageReceived(TabProxy* tab,
const IPC::Message& msg) { const IPC::Message& msg) {
DCHECK(tab == tab_.get()); DCHECK(tab == tab_.get());
// Quickly process network related messages. // Quickly process network related messages.
if (url_fetcher_ && ProcessUrlRequestMessage(tab, msg, false)) if (url_fetcher_ && ProcessUrlRequestMessage(tab, msg, false))
return; return true;
// Early check to avoid needless marshaling // Early check to avoid needless marshaling
if (chrome_frame_delegate_ == NULL) if (chrome_frame_delegate_ == NULL)
return; return false;
PostTask(FROM_HERE, NewRunnableMethod(this, PostTask(FROM_HERE, NewRunnableMethod(this,
&ChromeFrameAutomationClient::OnMessageReceivedUIThread, msg)); &ChromeFrameAutomationClient::OnMessageReceivedUIThread, msg));
return true;
} }
void ChromeFrameAutomationClient::OnChannelError(TabProxy* tab) { void ChromeFrameAutomationClient::OnChannelError(TabProxy* tab) {
......
...@@ -459,7 +459,7 @@ class ChromeFrameAutomationClient ...@@ -459,7 +459,7 @@ class ChromeFrameAutomationClient
virtual void AutomationServerDied(); virtual void AutomationServerDied();
// TabProxyDelegate implementation // TabProxyDelegate implementation
virtual void OnMessageReceived(TabProxy* tab, const IPC::Message& msg); virtual bool OnMessageReceived(TabProxy* tab, const IPC::Message& msg);
virtual void OnChannelError(TabProxy* tab); virtual void OnChannelError(TabProxy* tab);
void CreateExternalTab(); void CreateExternalTab();
...@@ -480,7 +480,7 @@ class ChromeFrameAutomationClient ...@@ -480,7 +480,7 @@ class ChromeFrameAutomationClient
} }
private: private:
void OnMessageReceivedUIThread(const IPC::Message& msg); bool OnMessageReceivedUIThread(const IPC::Message& msg);
void OnChannelErrorUIThread(); void OnChannelErrorUIThread();
HWND chrome_window() const { return chrome_window_; } HWND chrome_window() const { return chrome_window_; }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment