| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 virtual int GetPendingUpdateStreamMessages(); | 80 virtual int GetPendingUpdateStreamMessages(); |
| 81 | 81 |
| 82 // Disconnect the client connection. This method is allowed to be called | 82 // Disconnect the client connection. This method is allowed to be called |
| 83 // more than once and calls after the first one will be ignored. | 83 // more than once and calls after the first one will be ignored. |
| 84 // | 84 // |
| 85 // After this method is called all the send method calls will be ignored. | 85 // After this method is called all the send method calls will be ignored. |
| 86 virtual void Disconnect(); | 86 virtual void Disconnect(); |
| 87 | 87 |
| 88 protected: | 88 protected: |
| 89 // Protected constructor used by unit test. | 89 // Protected constructor used by unit test. |
| 90 ClientConnection() {} | 90 ClientConnection(); |
| 91 | 91 |
| 92 private: | 92 private: |
| 93 // Callback for ChromotingConnection. | 93 // Callback for ChromotingConnection. |
| 94 void OnConnectionStateChange(ChromotingConnection::State state); | 94 void OnConnectionStateChange(ChromotingConnection::State state); |
| 95 | 95 |
| 96 // Callback for EventsStreamReader. | 96 // Callback for EventsStreamReader. |
| 97 void OnMessageReceived(ChromotingClientMessage* message); | 97 void OnMessageReceived(ChromotingClientMessage* message); |
| 98 | 98 |
| 99 // Process a libjingle state change event on the |loop_|. | 99 // Process a libjingle state change event on the |loop_|. |
| 100 void StateChangeTask(ChromotingConnection::State state); | 100 void StateChangeTask(ChromotingConnection::State state); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 115 | 115 |
| 116 // Event handler for handling events sent from this object. | 116 // Event handler for handling events sent from this object. |
| 117 EventHandler* handler_; | 117 EventHandler* handler_; |
| 118 | 118 |
| 119 DISALLOW_COPY_AND_ASSIGN(ClientConnection); | 119 DISALLOW_COPY_AND_ASSIGN(ClientConnection); |
| 120 }; | 120 }; |
| 121 | 121 |
| 122 } // namespace remoting | 122 } // namespace remoting |
| 123 | 123 |
| 124 #endif // REMOTING_HOST_CLIENT_CONNECTION_H_ | 124 #endif // REMOTING_HOST_CLIENT_CONNECTION_H_ |
| OLD | NEW |