| 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 21 matching lines...) Expand all Loading... |
| 32 public: | 32 public: |
| 33 virtual ~EventHandler() {} | 33 virtual ~EventHandler() {} |
| 34 | 34 |
| 35 // Called when the network connection is opened. | 35 // Called when the network connection is opened. |
| 36 virtual void OnConnectionOpened(ConnectionToClient* connection) = 0; | 36 virtual void OnConnectionOpened(ConnectionToClient* connection) = 0; |
| 37 | 37 |
| 38 // Called when the network connection is closed. | 38 // Called when the network connection is closed. |
| 39 virtual void OnConnectionClosed(ConnectionToClient* connection) = 0; | 39 virtual void OnConnectionClosed(ConnectionToClient* connection) = 0; |
| 40 | 40 |
| 41 // Called when the network connection has failed. | 41 // Called when the network connection has failed. |
| 42 virtual void OnConnectionFailed(ConnectionToClient* connection) = 0; | 42 virtual void OnConnectionFailed(ConnectionToClient* connection, |
| 43 Session::Error error) = 0; |
| 43 | 44 |
| 44 // Called when sequence number is updated. | 45 // Called when sequence number is updated. |
| 45 virtual void OnSequenceNumberUpdated(ConnectionToClient* connection, | 46 virtual void OnSequenceNumberUpdated(ConnectionToClient* connection, |
| 46 int64 sequence_number) = 0; | 47 int64 sequence_number) = 0; |
| 47 }; | 48 }; |
| 48 | 49 |
| 49 // Constructs a ConnectionToClient object for the |session|. Takes | 50 // Constructs a ConnectionToClient object for the |session|. Takes |
| 50 // ownership of |session|. | 51 // ownership of |session|. |
| 51 explicit ConnectionToClient(Session* session); | 52 explicit ConnectionToClient(Session* session); |
| 52 virtual ~ConnectionToClient(); | 53 virtual ~ConnectionToClient(); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 scoped_ptr<HostEventDispatcher> event_dispatcher_; | 105 scoped_ptr<HostEventDispatcher> event_dispatcher_; |
| 105 scoped_ptr<VideoWriter> video_writer_; | 106 scoped_ptr<VideoWriter> video_writer_; |
| 106 | 107 |
| 107 DISALLOW_COPY_AND_ASSIGN(ConnectionToClient); | 108 DISALLOW_COPY_AND_ASSIGN(ConnectionToClient); |
| 108 }; | 109 }; |
| 109 | 110 |
| 110 } // namespace protocol | 111 } // namespace protocol |
| 111 } // namespace remoting | 112 } // namespace remoting |
| 112 | 113 |
| 113 #endif // REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ | 114 #endif // REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ |
| OLD | NEW |