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

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

Issue 8587009: Add OVERRIDE to content/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 1 month 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 | « content/common/hi_res_timer_manager.h ('k') | content/common/np_channel_base.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) 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 7 #pragma once
8 8
9 #include "base/id_map.h" 9 #include "base/id_map.h"
10 #include "ipc/ipc_channel.h" 10 #include "ipc/ipc_channel.h"
(...skipping 19 matching lines...) Expand all
30 class MessageRouter : public IPC::Channel::Listener, 30 class MessageRouter : public IPC::Channel::Listener,
31 public IPC::Message::Sender { 31 public IPC::Message::Sender {
32 public: 32 public:
33 MessageRouter(); 33 MessageRouter();
34 virtual ~MessageRouter(); 34 virtual ~MessageRouter();
35 35
36 // Implemented by subclasses to handle control messages 36 // Implemented by subclasses to handle control messages
37 virtual bool OnControlMessageReceived(const IPC::Message& msg); 37 virtual bool OnControlMessageReceived(const IPC::Message& msg);
38 38
39 // IPC::Channel::Listener implementation: 39 // IPC::Channel::Listener implementation:
40 virtual bool OnMessageReceived(const IPC::Message& msg); 40 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
41 41
42 // Like OnMessageReceived, except it only handles routed messages. Returns 42 // Like OnMessageReceived, except it only handles routed messages. Returns
43 // true if the message was dispatched, or false if there was no listener for 43 // true if the message was dispatched, or false if there was no listener for
44 // that route id. 44 // that route id.
45 virtual bool RouteMessage(const IPC::Message& msg); 45 virtual bool RouteMessage(const IPC::Message& msg);
46 46
47 // IPC::Message::Sender implementation: 47 // IPC::Message::Sender implementation:
48 virtual bool Send(IPC::Message* msg); 48 virtual bool Send(IPC::Message* msg) OVERRIDE;
49 49
50 // Called to add/remove a listener for a particular message routing ID. 50 // Called to add/remove a listener for a particular message routing ID.
51 void AddRoute(int32 routing_id, IPC::Channel::Listener* listener); 51 void AddRoute(int32 routing_id, IPC::Channel::Listener* listener);
52 void RemoveRoute(int32 routing_id); 52 void RemoveRoute(int32 routing_id);
53 53
54 IPC::Channel::Listener* ResolveRoute(int32 routing_id); 54 IPC::Channel::Listener* ResolveRoute(int32 routing_id);
55 55
56 private: 56 private:
57 // A list of all listeners with assigned routing IDs. 57 // A list of all listeners with assigned routing IDs.
58 IDMap<IPC::Channel::Listener> routes_; 58 IDMap<IPC::Channel::Listener> routes_;
59 59
60 DISALLOW_COPY_AND_ASSIGN(MessageRouter); 60 DISALLOW_COPY_AND_ASSIGN(MessageRouter);
61 }; 61 };
62 62
63 #endif // CONTENT_COMMON_MESSAGE_ROUTER_H_ 63 #endif // CONTENT_COMMON_MESSAGE_ROUTER_H_
OLDNEW
« no previous file with comments | « content/common/hi_res_timer_manager.h ('k') | content/common/np_channel_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698