| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 IPC_MESSAGE_ROUTER_H_ | 5 #ifndef IPC_MESSAGE_ROUTER_H_ |
| 6 #define IPC_MESSAGE_ROUTER_H_ | 6 #define IPC_MESSAGE_ROUTER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/id_map.h" | 10 #include "base/id_map.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 bool AddRoute(int32_t routing_id, Listener* listener); | 57 bool AddRoute(int32_t routing_id, Listener* listener); |
| 58 | 58 |
| 59 // Called to remove a listener for a particular message routing ID. | 59 // Called to remove a listener for a particular message routing ID. |
| 60 void RemoveRoute(int32_t routing_id); | 60 void RemoveRoute(int32_t routing_id); |
| 61 | 61 |
| 62 // Returns the Listener associated with |routing_id|. | 62 // Returns the Listener associated with |routing_id|. |
| 63 Listener* GetRoute(int32_t routing_id); | 63 Listener* GetRoute(int32_t routing_id); |
| 64 | 64 |
| 65 private: | 65 private: |
| 66 // A list of all listeners with assigned routing IDs. | 66 // A list of all listeners with assigned routing IDs. |
| 67 IDMap<Listener> routes_; | 67 IDMap<Listener*> routes_; |
| 68 | 68 |
| 69 DISALLOW_COPY_AND_ASSIGN(MessageRouter); | 69 DISALLOW_COPY_AND_ASSIGN(MessageRouter); |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 } // namespace IPC | 72 } // namespace IPC |
| 73 | 73 |
| 74 #endif // IPC_MESSAGE_ROUTER_H_ | 74 #endif // IPC_MESSAGE_ROUTER_H_ |
| OLD | NEW |