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 REMOTING_PROTOCOL_CLIENT_CONTROL_DISPATCHER_H_ | 5 #ifndef REMOTING_PROTOCOL_CLIENT_CONTROL_DISPATCHER_H_ |
6 #define REMOTING_PROTOCOL_CLIENT_CONTROL_DISPATCHER_H_ | 6 #define REMOTING_PROTOCOL_CLIENT_CONTROL_DISPATCHER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "remoting/protocol/channel_dispatcher_base.h" | 10 #include "remoting/protocol/channel_dispatcher_base.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 // message. |client_stub| must outlive this object. | 45 // message. |client_stub| must outlive this object. |
46 void set_client_stub(ClientStub* client_stub) { client_stub_ = client_stub; } | 46 void set_client_stub(ClientStub* client_stub) { client_stub_ = client_stub; } |
47 | 47 |
48 // Sets the ClipboardStub that will be called for each incoming clipboard | 48 // Sets the ClipboardStub that will be called for each incoming clipboard |
49 // message. |clipboard_stub| must outlive this object. | 49 // message. |clipboard_stub| must outlive this object. |
50 void set_clipboard_stub(ClipboardStub* clipboard_stub) { | 50 void set_clipboard_stub(ClipboardStub* clipboard_stub) { |
51 clipboard_stub_ = clipboard_stub; | 51 clipboard_stub_ = clipboard_stub; |
52 } | 52 } |
53 | 53 |
54 private: | 54 private: |
55 void OnMessageReceived(scoped_ptr<ControlMessage> message, | 55 void OnMessageReceived(scoped_ptr<ControlMessage> message); |
56 const base::Closure& done_task); | |
57 | 56 |
58 ClientStub* client_stub_; | 57 ClientStub* client_stub_; |
59 ClipboardStub* clipboard_stub_; | 58 ClipboardStub* clipboard_stub_; |
60 | 59 |
61 ProtobufMessageParser<ControlMessage> parser_; | 60 ProtobufMessageParser<ControlMessage> parser_; |
62 | 61 |
63 DISALLOW_COPY_AND_ASSIGN(ClientControlDispatcher); | 62 DISALLOW_COPY_AND_ASSIGN(ClientControlDispatcher); |
64 }; | 63 }; |
65 | 64 |
66 } // namespace protocol | 65 } // namespace protocol |
67 } // namespace remoting | 66 } // namespace remoting |
68 | 67 |
69 #endif // REMOTING_PROTOCOL_CLIENT_CONTROL_DISPATCHER_H_ | 68 #endif // REMOTING_PROTOCOL_CLIENT_CONTROL_DISPATCHER_H_ |
OLD | NEW |