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

Side by Side Diff: chrome/common/message_router.cc

Issue 40226: Fix files with lines > 80 cols. Part 2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 9 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
« no previous file with comments | « chrome/common/mach_ipc_mac.h ('k') | chrome/common/net/url_request_intercept_job.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/common/message_router.h" 5 #include "chrome/common/message_router.h"
6 #include "chrome/common/render_messages.h" 6 #include "chrome/common/render_messages.h"
7 7
8 void MessageRouter::OnControlMessageReceived(const IPC::Message& msg) { 8 void MessageRouter::OnControlMessageReceived(const IPC::Message& msg) {
9 NOTREACHED() << "should override in subclass if you care about control message s"; 9 NOTREACHED() <<
10 "should override in subclass if you care about control messages";
10 } 11 }
11 12
12 bool MessageRouter::Send(IPC::Message* msg) { 13 bool MessageRouter::Send(IPC::Message* msg) {
13 NOTREACHED() << "should override in subclass if you care about sending message s"; 14 NOTREACHED() <<
15 "should override in subclass if you care about sending messages";
14 return false; 16 return false;
15 } 17 }
16 18
17 void MessageRouter::AddRoute(int32 routing_id, 19 void MessageRouter::AddRoute(int32 routing_id,
18 IPC::Channel::Listener* listener) { 20 IPC::Channel::Listener* listener) {
19 routes_.AddWithID(listener, routing_id); 21 routes_.AddWithID(listener, routing_id);
20 } 22 }
21 23
22 void MessageRouter::RemoveRoute(int32 routing_id) { 24 void MessageRouter::RemoveRoute(int32 routing_id) {
23 routes_.Remove(routing_id); 25 routes_.Remove(routing_id);
24 } 26 }
25 27
26 void MessageRouter::OnMessageReceived(const IPC::Message& msg) { 28 void MessageRouter::OnMessageReceived(const IPC::Message& msg) {
27 if (msg.routing_id() == MSG_ROUTING_CONTROL) { 29 if (msg.routing_id() == MSG_ROUTING_CONTROL) {
28 OnControlMessageReceived(msg); 30 OnControlMessageReceived(msg);
29 } else { 31 } else {
30 RouteMessage(msg); 32 RouteMessage(msg);
31 } 33 }
32 } 34 }
33 35
34 bool MessageRouter::RouteMessage(const IPC::Message& msg) { 36 bool MessageRouter::RouteMessage(const IPC::Message& msg) {
35 IPC::Channel::Listener* listener = routes_.Lookup(msg.routing_id()); 37 IPC::Channel::Listener* listener = routes_.Lookup(msg.routing_id());
36 if (!listener) 38 if (!listener)
37 return false; 39 return false;
38 40
39 listener->OnMessageReceived(msg); 41 listener->OnMessageReceived(msg);
40 return true; 42 return true;
41 } 43 }
42 44
OLDNEW
« no previous file with comments | « chrome/common/mach_ipc_mac.h ('k') | chrome/common/net/url_request_intercept_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698