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_CONNECTION_TO_CLIENT_H_ | 5 #ifndef REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ |
6 #define REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ | 6 #define REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 // Disconnect the client connection. | 76 // Disconnect the client connection. |
77 virtual void Disconnect(); | 77 virtual void Disconnect(); |
78 | 78 |
79 // Update the sequence number when received from the client. EventHandler | 79 // Update the sequence number when received from the client. EventHandler |
80 // will be called. | 80 // will be called. |
81 virtual void UpdateSequenceNumber(int64 sequence_number); | 81 virtual void UpdateSequenceNumber(int64 sequence_number); |
82 | 82 |
83 // Send encoded update stream data to the viewer. | 83 // Send encoded update stream data to the viewer. |
84 virtual VideoStub* video_stub(); | 84 virtual VideoStub* video_stub(); |
85 | 85 |
86 // Return pointer to ClientStub. | 86 // Send control data to the viewer/client. |
87 virtual ClientStub* client_stub(); | 87 virtual ClientStub* client_stub(); |
88 | 88 |
| 89 // Stubs for receiving data from the client. |
89 // These three setters should be called before Init(). | 90 // These three setters should be called before Init(). |
90 virtual void set_clipboard_stub(ClipboardStub* clipboard_stub); | 91 virtual void set_clipboard_stub(ClipboardStub* clipboard_stub); |
91 virtual void set_host_stub(HostStub* host_stub); | 92 virtual void set_host_stub(HostStub* host_stub); |
92 virtual void set_input_stub(InputStub* input_stub); | 93 virtual void set_input_stub(InputStub* input_stub); |
93 | 94 |
94 private: | 95 private: |
95 // Callback for protocol Session. | 96 // Callback for protocol Session. |
96 void OnSessionStateChange(Session::State state); | 97 void OnSessionStateChange(Session::State state); |
97 | 98 |
98 void OnSessionRouteChange(const std::string& channel_name, | 99 void OnSessionRouteChange(const std::string& channel_name, |
(...skipping 24 matching lines...) Expand all Loading... |
123 scoped_ptr<HostEventDispatcher> event_dispatcher_; | 124 scoped_ptr<HostEventDispatcher> event_dispatcher_; |
124 scoped_ptr<VideoWriter> video_writer_; | 125 scoped_ptr<VideoWriter> video_writer_; |
125 | 126 |
126 DISALLOW_COPY_AND_ASSIGN(ConnectionToClient); | 127 DISALLOW_COPY_AND_ASSIGN(ConnectionToClient); |
127 }; | 128 }; |
128 | 129 |
129 } // namespace protocol | 130 } // namespace protocol |
130 } // namespace remoting | 131 } // namespace remoting |
131 | 132 |
132 #endif // REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ | 133 #endif // REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ |
OLD | NEW |