OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
49 virtual void OnConnectionFailed(ConnectionToClient* connection) = 0; | 49 virtual void OnConnectionFailed(ConnectionToClient* connection) = 0; |
50 | 50 |
51 // Called when sequence number is updated. | 51 // Called when sequence number is updated. |
52 virtual void OnSequenceNumberUpdated(ConnectionToClient* connection, | 52 virtual void OnSequenceNumberUpdated(ConnectionToClient* connection, |
53 int64 sequence_number) = 0; | 53 int64 sequence_number) = 0; |
54 }; | 54 }; |
55 | 55 |
56 // Constructs a ConnectionToClient object. |message_loop| is the message loop | 56 // Constructs a ConnectionToClient object. |message_loop| is the message loop |
57 // that this object runs on. A viewer object receives events and messages from | 57 // that this object runs on. A viewer object receives events and messages from |
58 // a libjingle channel, these events are delegated to |handler|. | 58 // a libjingle channel, these events are delegated to |handler|. |
59 // It is guaranteed that |handler| is called only on the |message_loop|. | 59 // It is guaranteed that |handler| is called only on the |message_loop|. |
Wez
2011/11/09 01:35:07
Update this comment now that the function signatur
Sergey Ulanov
2011/11/09 19:26:13
Done.
| |
60 ConnectionToClient(base::MessageLoopProxy* message_loop, | 60 ConnectionToClient(base::MessageLoopProxy* message_loop, Session* session); |
61 EventHandler* handler); | |
62 | 61 |
63 virtual void Init(Session* session); | 62 void SetEventHandler(EventHandler* event_handler); |
Wez
2011/11/09 01:35:07
Clarify the semantics? What happens if events hap
Sergey Ulanov
2011/11/09 19:26:13
Done.
| |
64 | 63 |
65 // Returns the connection in use. | 64 // Returns the connection in use. |
66 virtual Session* session(); | 65 virtual Session* session(); |
67 | 66 |
68 // Disconnect the client connection. This method is allowed to be called | 67 // Disconnect the client connection. This method is allowed to be called |
69 // more than once and calls after the first one will be ignored. | 68 // more than once and calls after the first one will be ignored. |
70 // | 69 // |
71 // After this method is called all the send method calls will be ignored. | 70 // After this method is called all the send method calls will be ignored. |
72 virtual void Disconnect(); | 71 virtual void Disconnect(); |
73 | 72 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
128 bool input_connected_; | 127 bool input_connected_; |
129 bool video_connected_; | 128 bool video_connected_; |
130 | 129 |
131 DISALLOW_COPY_AND_ASSIGN(ConnectionToClient); | 130 DISALLOW_COPY_AND_ASSIGN(ConnectionToClient); |
132 }; | 131 }; |
133 | 132 |
134 } // namespace protocol | 133 } // namespace protocol |
135 } // namespace remoting | 134 } // namespace remoting |
136 | 135 |
137 #endif // REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ | 136 #endif // REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ |
OLD | NEW |