| OLD | NEW |
| 1 // Copyright (c) 2006-2008 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/common/message_router.h" | 5 #include "base/mp/message_router.h" |
| 6 |
| 7 namespace base { |
| 6 | 8 |
| 7 void MessageRouter::OnControlMessageReceived(const IPC::Message& msg) { | 9 void MessageRouter::OnControlMessageReceived(const IPC::Message& msg) { |
| 8 NOTREACHED() << | 10 NOTREACHED() << |
| 9 "should override in subclass if you care about control messages"; | 11 "should override in subclass if you care about control messages"; |
| 10 } | 12 } |
| 11 | 13 |
| 12 bool MessageRouter::Send(IPC::Message* msg) { | 14 bool MessageRouter::Send(IPC::Message* msg) { |
| 13 NOTREACHED() << | 15 NOTREACHED() << |
| 14 "should override in subclass if you care about sending messages"; | 16 "should override in subclass if you care about sending messages"; |
| 15 return false; | 17 return false; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 37 if (!listener) | 39 if (!listener) |
| 38 return false; | 40 return false; |
| 39 | 41 |
| 40 listener->OnMessageReceived(msg); | 42 listener->OnMessageReceived(msg); |
| 41 return true; | 43 return true; |
| 42 } | 44 } |
| 43 | 45 |
| 44 IPC::Channel::Listener* MessageRouter::ResolveRoute(int32 routing_id) { | 46 IPC::Channel::Listener* MessageRouter::ResolveRoute(int32 routing_id) { |
| 45 return routes_.Lookup(routing_id); | 47 return routes_.Lookup(routing_id); |
| 46 } | 48 } |
| 49 |
| 50 } // namespace base |
| OLD | NEW |