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

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

Issue 10382184: [Chromoting] Initial plumbing for cursor shape. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unused vars. Fix Mac Capturer Unittest. Created 8 years, 6 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/cursor_shape_stub.h ('k') | remoting/protocol/host_control_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) 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 REMOTING_PROTOCOL_HOST_CONTROL_DISPATCHER_H_ 5 #ifndef REMOTING_PROTOCOL_HOST_CONTROL_DISPATCHER_H_
6 #define REMOTING_PROTOCOL_HOST_CONTROL_DISPATCHER_H_ 6 #define REMOTING_PROTOCOL_HOST_CONTROL_DISPATCHER_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "remoting/protocol/buffered_socket_writer.h" 9 #include "remoting/protocol/buffered_socket_writer.h"
10 #include "remoting/protocol/channel_dispatcher_base.h" 10 #include "remoting/protocol/channel_dispatcher_base.h"
11 #include "remoting/protocol/client_stub.h" 11 #include "remoting/protocol/client_stub.h"
12 #include "remoting/protocol/clipboard_stub.h" 12 #include "remoting/protocol/clipboard_stub.h"
13 #include "remoting/protocol/cursor_shape_stub.h"
13 #include "remoting/protocol/message_reader.h" 14 #include "remoting/protocol/message_reader.h"
14 15
15 namespace net { 16 namespace net {
16 class StreamSocket; 17 class StreamSocket;
17 } // namespace net 18 } // namespace net
18 19
19 namespace remoting { 20 namespace remoting {
20 namespace protocol { 21 namespace protocol {
21 22
22 class ControlMessage; 23 class ControlMessage;
23 class HostStub; 24 class HostStub;
24 class Session; 25 class Session;
25 26
26 // HostControlDispatcher dispatches incoming messages on the control 27 // HostControlDispatcher dispatches incoming messages on the control
27 // channel to HostStub or ClipboardStub, and also implements ClientStub for 28 // channel to HostStub or ClipboardStub, and also implements ClientStub and
28 // outgoing messages. 29 // CursorShapeStub for outgoing messages.
29 class HostControlDispatcher : public ChannelDispatcherBase, public ClientStub { 30 class HostControlDispatcher : public ChannelDispatcherBase,
31 public ClientStub {
30 public: 32 public:
31 HostControlDispatcher(); 33 HostControlDispatcher();
32 virtual ~HostControlDispatcher(); 34 virtual ~HostControlDispatcher();
33 35
34 // ClipboardStub implementation. 36 // ClipboardStub implementation for sending clipboard data to client.
35 virtual void InjectClipboardEvent(const ClipboardEvent& event) OVERRIDE; 37 virtual void InjectClipboardEvent(const ClipboardEvent& event) OVERRIDE;
36 38
39 // CursorShapeStub implementation for sending cursor shape to client.
40 virtual void SetCursorShape(const CursorShapeInfo& cursor_shape) OVERRIDE;
41
37 // Sets the ClipboardStub that will be called for each incoming clipboard 42 // Sets the ClipboardStub that will be called for each incoming clipboard
38 // message. |clipboard_stub| must outlive this object. 43 // message. |clipboard_stub| must outlive this object.
39 void set_clipboard_stub(ClipboardStub* clipboard_stub) { 44 void set_clipboard_stub(ClipboardStub* clipboard_stub) {
40 clipboard_stub_ = clipboard_stub; 45 clipboard_stub_ = clipboard_stub;
41 } 46 }
42 47
43 // Sets the HostStub that will be called for each incoming control 48 // Sets the HostStub that will be called for each incoming control
44 // message. |host_stub| must outlive this object. 49 // message. |host_stub| must outlive this object.
45 void set_host_stub(HostStub* host_stub) { host_stub_ = host_stub; } 50 void set_host_stub(HostStub* host_stub) { host_stub_ = host_stub; }
46 51
(...skipping 11 matching lines...) Expand all
58 ProtobufMessageReader<ControlMessage> reader_; 63 ProtobufMessageReader<ControlMessage> reader_;
59 BufferedSocketWriter writer_; 64 BufferedSocketWriter writer_;
60 65
61 DISALLOW_COPY_AND_ASSIGN(HostControlDispatcher); 66 DISALLOW_COPY_AND_ASSIGN(HostControlDispatcher);
62 }; 67 };
63 68
64 } // namespace protocol 69 } // namespace protocol
65 } // namespace remoting 70 } // namespace remoting
66 71
67 #endif // REMOTING_PROTOCOL_HOST_CONTROL_DISPATCHER_H_ 72 #endif // REMOTING_PROTOCOL_HOST_CONTROL_DISPATCHER_H_
OLDNEW
« no previous file with comments | « remoting/protocol/cursor_shape_stub.h ('k') | remoting/protocol/host_control_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698