OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CONTENT_COMMON_MESSAGE_ROUTER_H_ | 5 #ifndef CONTENT_COMMON_MESSAGE_ROUTER_H_ |
6 #define CONTENT_COMMON_MESSAGE_ROUTER_H_ | 6 #define CONTENT_COMMON_MESSAGE_ROUTER_H_ |
7 #pragma once | |
8 | 7 |
9 #include "base/id_map.h" | 8 #include "base/id_map.h" |
10 #include "ipc/ipc_listener.h" | 9 #include "ipc/ipc_listener.h" |
11 #include "ipc/ipc_sender.h" | 10 #include "ipc/ipc_sender.h" |
12 | 11 |
13 // The MessageRouter handles all incoming messages sent to it by routing them | 12 // The MessageRouter handles all incoming messages sent to it by routing them |
14 // to the correct listener. Routing is based on the Message's routing ID. | 13 // to the correct listener. Routing is based on the Message's routing ID. |
15 // Since routing IDs are typically assigned asynchronously by the browser | 14 // Since routing IDs are typically assigned asynchronously by the browser |
16 // process, the MessageRouter has the notion of pending IDs for listeners that | 15 // process, the MessageRouter has the notion of pending IDs for listeners that |
17 // have not yet been assigned a routing ID. | 16 // have not yet been assigned a routing ID. |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 IPC::Listener* ResolveRoute(int32 routing_id); | 53 IPC::Listener* ResolveRoute(int32 routing_id); |
55 | 54 |
56 private: | 55 private: |
57 // A list of all listeners with assigned routing IDs. | 56 // A list of all listeners with assigned routing IDs. |
58 IDMap<IPC::Listener> routes_; | 57 IDMap<IPC::Listener> routes_; |
59 | 58 |
60 DISALLOW_COPY_AND_ASSIGN(MessageRouter); | 59 DISALLOW_COPY_AND_ASSIGN(MessageRouter); |
61 }; | 60 }; |
62 | 61 |
63 #endif // CONTENT_COMMON_MESSAGE_ROUTER_H_ | 62 #endif // CONTENT_COMMON_MESSAGE_ROUTER_H_ |
OLD | NEW |