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

Side by Side Diff: remoting/protocol/host_message_dispatcher.h

Issue 8116021: Switch remoting/protocol to new callbacks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « remoting/protocol/host_control_sender.cc ('k') | remoting/protocol/host_message_dispatcher.cc » ('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 REMOTING_PROTOCOL_HOST_MESSAGE_DISPATCHER_H_ 5 #ifndef REMOTING_PROTOCOL_HOST_MESSAGE_DISPATCHER_H_
6 #define REMOTING_PROTOCOL_HOST_MESSAGE_DISPATCHER_H_ 6 #define REMOTING_PROTOCOL_HOST_MESSAGE_DISPATCHER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/task.h" 10 #include "base/task.h"
(...skipping 30 matching lines...) Expand all
41 virtual ~HostMessageDispatcher(); 41 virtual ~HostMessageDispatcher();
42 42
43 // Initialize the message dispatcher with the given connection and 43 // Initialize the message dispatcher with the given connection and
44 // message handlers. 44 // message handlers.
45 void Initialize(ConnectionToClient* connection, 45 void Initialize(ConnectionToClient* connection,
46 HostStub* host_stub, InputStub* input_stub); 46 HostStub* host_stub, InputStub* input_stub);
47 47
48 private: 48 private:
49 // This method is called by |control_channel_reader_| when a control 49 // This method is called by |control_channel_reader_| when a control
50 // message is received. 50 // message is received.
51 void OnControlMessageReceived(ControlMessage* message, Task* done_task); 51 void OnControlMessageReceived(ControlMessage* message,
52 const base::Closure& done_task);
52 53
53 // This method is called by |event_channel_reader_| when a event 54 // This method is called by |event_channel_reader_| when a event
54 // message is received. 55 // message is received.
55 void OnEventMessageReceived(EventMessage* message, Task* done_task); 56 void OnEventMessageReceived(EventMessage* message,
57 const base::Closure& done_task);
56 58
57 // MessageReader that runs on the control channel. It runs a loop 59 // MessageReader that runs on the control channel. It runs a loop
58 // that parses data on the channel and then delegates the message to this 60 // that parses data on the channel and then delegates the message to this
59 // class. 61 // class.
60 scoped_ptr<ProtobufMessageReader<ControlMessage> > control_message_reader_; 62 scoped_ptr<ProtobufMessageReader<ControlMessage> > control_message_reader_;
61 63
62 // MessageReader that runs on the event channel. 64 // MessageReader that runs on the event channel.
63 scoped_ptr<ProtobufMessageReader<EventMessage> > event_message_reader_; 65 scoped_ptr<ProtobufMessageReader<EventMessage> > event_message_reader_;
64 66
65 // Connection that this object belongs to. 67 // Connection that this object belongs to.
66 ConnectionToClient* connection_; 68 ConnectionToClient* connection_;
67 69
68 // Stubs for host and input. These objects are not owned. 70 // Stubs for host and input. These objects are not owned.
69 // They are called on the thread there data is received, i.e. jingle thread. 71 // They are called on the thread there data is received, i.e. jingle thread.
70 HostStub* host_stub_; 72 HostStub* host_stub_;
71 InputStub* input_stub_; 73 InputStub* input_stub_;
72 }; 74 };
73 75
74 } // namespace protocol 76 } // namespace protocol
75 } // namespace remoting 77 } // namespace remoting
76 78
77 #endif // REMOTING_PROTOCOL_HOST_MESSAGE_DISPATCHER_H_ 79 #endif // REMOTING_PROTOCOL_HOST_MESSAGE_DISPATCHER_H_
OLDNEW
« no previous file with comments | « remoting/protocol/host_control_sender.cc ('k') | remoting/protocol/host_message_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698