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

Side by Side Diff: chrome/browser/automation/chrome_frame_automation_provider.cc

Issue 5978003: Make IPC::Channel::Listener:OnMessageReceived have a return value indicating ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 12 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/automation/chrome_frame_automation_provider.h" 5 #include "chrome/browser/automation/chrome_frame_automation_provider.h"
6 #include "chrome/browser/profiles/profile.h" 6 #include "chrome/browser/profiles/profile.h"
7 #include "chrome/browser/profiles/profile_manager.h" 7 #include "chrome/browser/profiles/profile_manager.h"
8 #include "chrome/common/automation_messages.h" 8 #include "chrome/common/automation_messages.h"
9 #include "ipc/ipc_message.h" 9 #include "ipc/ipc_message.h"
10 #include "ipc/ipc_channel.h" 10 #include "ipc/ipc_channel.h"
11 11
12 ChromeFrameAutomationProvider::ChromeFrameAutomationProvider(Profile* profile) 12 ChromeFrameAutomationProvider::ChromeFrameAutomationProvider(Profile* profile)
13 : AutomationProvider(profile) {} 13 : AutomationProvider(profile) {}
14 14
15 void ChromeFrameAutomationProvider::OnMessageReceived( 15 bool ChromeFrameAutomationProvider::OnMessageReceived(
16 const IPC::Message& message) { 16 const IPC::Message& message) {
17 if (IsValidMessage(message.type())) { 17 if (IsValidMessage(message.type()))
18 AutomationProvider::OnMessageReceived(message); 18 return AutomationProvider::OnMessageReceived(message);
19 } else { 19
20 OnUnhandledMessage(message); 20 OnUnhandledMessage(message);
21 } 21 return false;
22 } 22 }
23 23
24 void ChromeFrameAutomationProvider::OnUnhandledMessage( 24 void ChromeFrameAutomationProvider::OnUnhandledMessage(
25 const IPC::Message& message) { 25 const IPC::Message& message) {
26 NOTREACHED() << __FUNCTION__ 26 NOTREACHED() << __FUNCTION__
27 << " Unhandled message type: " 27 << " Unhandled message type: "
28 << message.type(); 28 << message.type();
29 } 29 }
30 30
31 bool ChromeFrameAutomationProvider::IsValidMessage(uint32 type) { 31 bool ChromeFrameAutomationProvider::IsValidMessage(uint32 type) {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 break; 71 break;
72 } 72 }
73 73
74 default: 74 default:
75 break; 75 break;
76 } 76 }
77 77
78 return is_valid_message; 78 return is_valid_message;
79 } 79 }
80 80
OLDNEW
« no previous file with comments | « chrome/browser/automation/chrome_frame_automation_provider.h ('k') | chrome/browser/automation/testing_automation_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698