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

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

Issue 155905: Separates ipc code from common (http://crbug.com/16829) (Closed)
Patch Set: Fixes reference to 'common_message_traits' it's actually 'common_param_traits' Created 11 years, 5 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
« no previous file with comments | « chrome/common/logging_chrome.cc ('k') | chrome/common/plugin_messages.h » ('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 #ifndef CHROME_COMMON_MESSAGE_ROUTER_H__ 5 #ifndef CHROME_COMMON_MESSAGE_ROUTER_H__
6 #define CHROME_COMMON_MESSAGE_ROUTER_H__ 6 #define CHROME_COMMON_MESSAGE_ROUTER_H__
7 7
8 #include "base/id_map.h" 8 #include "base/id_map.h"
9 #include "chrome/common/ipc_channel.h" 9 #include "ipc/ipc_channel.h"
10 10
11 // The MessageRouter handles all incoming messages sent to it by routing them 11 // The MessageRouter handles all incoming messages sent to it by routing them
12 // to the correct listener. Routing is based on the Message's routing ID. 12 // to the correct listener. Routing is based on the Message's routing ID.
13 // Since routing IDs are typically assigned asynchronously by the browser 13 // Since routing IDs are typically assigned asynchronously by the browser
14 // process, the MessageRouter has the notion of pending IDs for listeners that 14 // process, the MessageRouter has the notion of pending IDs for listeners that
15 // have not yet been assigned a routing ID. 15 // have not yet been assigned a routing ID.
16 // 16 //
17 // When a message arrives, the routing ID is used to index the set of routes to 17 // When a message arrives, the routing ID is used to index the set of routes to
18 // find a listener. If a listener is found, then the message is passed to it. 18 // find a listener. If a listener is found, then the message is passed to it.
19 // Otherwise, the message is ignored if its routing ID is not equal to 19 // Otherwise, the message is ignored if its routing ID is not equal to
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 void RemoveRoute(int32 routing_id); 51 void RemoveRoute(int32 routing_id);
52 52
53 private: 53 private:
54 // A list of all listeners with assigned routing IDs. 54 // A list of all listeners with assigned routing IDs.
55 IDMap<IPC::Channel::Listener> routes_; 55 IDMap<IPC::Channel::Listener> routes_;
56 56
57 DISALLOW_EVIL_CONSTRUCTORS(MessageRouter); 57 DISALLOW_EVIL_CONSTRUCTORS(MessageRouter);
58 }; 58 };
59 59
60 #endif // CHROME_COMMON_MESSAGE_ROUTER_H__ 60 #endif // CHROME_COMMON_MESSAGE_ROUTER_H__
OLDNEW
« no previous file with comments | « chrome/common/logging_chrome.cc ('k') | chrome/common/plugin_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698