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_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 <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 ConnectionToClient(MessageLoop* message_loop, | 56 ConnectionToClient(MessageLoop* message_loop, |
57 EventHandler* handler); | 57 EventHandler* handler); |
58 | 58 |
59 virtual ~ConnectionToClient(); | 59 virtual ~ConnectionToClient(); |
60 | 60 |
61 virtual void Init(protocol::Session* session); | 61 virtual void Init(protocol::Session* session); |
62 | 62 |
63 // Returns the connection in use. | 63 // Returns the connection in use. |
64 virtual protocol::Session* session(); | 64 virtual protocol::Session* session(); |
65 | 65 |
66 // Send information to the client for initialization. | |
67 virtual void SendInitClientMessage(int width, int height); | |
68 | |
69 // Send encoded update stream data to the viewer. | 66 // Send encoded update stream data to the viewer. |
70 virtual void SendVideoPacket(const VideoPacket& packet); | 67 virtual void SendVideoPacket(const VideoPacket& packet); |
71 | 68 |
72 // Gets the number of update stream messages not yet transmitted. | 69 // Gets the number of update stream messages not yet transmitted. |
73 // Note that the value returned is an estimate using average size of the | 70 // Note that the value returned is an estimate using average size of the |
74 // most recent update streams. | 71 // most recent update streams. |
75 // TODO(hclam): Report this number accurately. | 72 // TODO(hclam): Report this number accurately. |
76 virtual int GetPendingUpdateStreamMessages(); | 73 virtual int GetPendingUpdateStreamMessages(); |
77 | 74 |
78 // Disconnect the client connection. This method is allowed to be called | 75 // Disconnect the client connection. This method is allowed to be called |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 // Event handler for handling events sent from this object. | 110 // Event handler for handling events sent from this object. |
114 EventHandler* handler_; | 111 EventHandler* handler_; |
115 | 112 |
116 DISALLOW_COPY_AND_ASSIGN(ConnectionToClient); | 113 DISALLOW_COPY_AND_ASSIGN(ConnectionToClient); |
117 }; | 114 }; |
118 | 115 |
119 } // namespace protocol | 116 } // namespace protocol |
120 } // namespace remoting | 117 } // namespace remoting |
121 | 118 |
122 #endif // REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ | 119 #endif // REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ |
OLD | NEW |