OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_HOST_CLIENT_CONNECTION_H_ | 5 #ifndef REMOTING_HOST_CLIENT_CONNECTION_H_ |
6 #define REMOTING_HOST_CLIENT_CONNECTION_H_ | 6 #define REMOTING_HOST_CLIENT_CONNECTION_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 | 57 |
58 virtual void Init(ChromotocolConnection* connection); | 58 virtual void Init(ChromotocolConnection* connection); |
59 | 59 |
60 // Returns the connection in use. | 60 // Returns the connection in use. |
61 virtual ChromotocolConnection* connection(); | 61 virtual ChromotocolConnection* connection(); |
62 | 62 |
63 // Send information to the client for initialization. | 63 // Send information to the client for initialization. |
64 virtual void SendInitClientMessage(int width, int height); | 64 virtual void SendInitClientMessage(int width, int height); |
65 | 65 |
66 // Send encoded update stream data to the viewer. | 66 // Send encoded update stream data to the viewer. |
67 virtual void SendVideoPacket(const VideoPacket& packet); | 67 virtual void SendUpdateStreamPacketMessage( |
| 68 const ChromotingHostMessage& message); |
68 | 69 |
69 // Gets the number of update stream messages not yet transmitted. | 70 // Gets the number of update stream messages not yet transmitted. |
70 // Note that the value returned is an estimate using average size of the | 71 // Note that the value returned is an estimate using average size of the |
71 // most recent update streams. | 72 // most recent update streams. |
72 // TODO(hclam): Report this number accurately. | 73 // TODO(hclam): Report this number accurately. |
73 virtual int GetPendingUpdateStreamMessages(); | 74 virtual int GetPendingUpdateStreamMessages(); |
74 | 75 |
75 // Disconnect the client connection. This method is allowed to be called | 76 // Disconnect the client connection. This method is allowed to be called |
76 // more than once and calls after the first one will be ignored. | 77 // more than once and calls after the first one will be ignored. |
77 // | 78 // |
(...skipping 30 matching lines...) Expand all Loading... |
108 | 109 |
109 // Event handler for handling events sent from this object. | 110 // Event handler for handling events sent from this object. |
110 EventHandler* handler_; | 111 EventHandler* handler_; |
111 | 112 |
112 DISALLOW_COPY_AND_ASSIGN(ClientConnection); | 113 DISALLOW_COPY_AND_ASSIGN(ClientConnection); |
113 }; | 114 }; |
114 | 115 |
115 } // namespace remoting | 116 } // namespace remoting |
116 | 117 |
117 #endif // REMOTING_HOST_CLIENT_CONNECTION_H_ | 118 #endif // REMOTING_HOST_CLIENT_CONNECTION_H_ |
OLD | NEW |