Chromium Code Reviews| 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_CHROMOTING_HOST_H_ | 5 #ifndef REMOTING_CHROMOTING_HOST_H_ |
| 6 #define REMOTING_CHROMOTING_HOST_H_ | 6 #define REMOTING_CHROMOTING_HOST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 93 void Shutdown(Task* shutdown_task); | 93 void Shutdown(Task* shutdown_task); |
| 94 | 94 |
| 95 // Adds |observer| to the list of status observers. Doesn't take | 95 // Adds |observer| to the list of status observers. Doesn't take |
| 96 // ownership of |observer|, so |observer| must outlive this | 96 // ownership of |observer|, so |observer| must outlive this |
| 97 // object. All status observers must be added before the host is | 97 // object. All status observers must be added before the host is |
| 98 // started. | 98 // started. |
| 99 void AddStatusObserver(HostStatusObserver* observer); | 99 void AddStatusObserver(HostStatusObserver* observer); |
| 100 | 100 |
| 101 //////////////////////////////////////////////////////////////////////////// | 101 //////////////////////////////////////////////////////////////////////////// |
| 102 // protocol::ConnectionToClient::EventHandler implementation. | 102 // protocol::ConnectionToClient::EventHandler implementation. |
| 103 // TODO(sergeyu): Move this to ClientSession. | |
|
Wez
2011/11/03 18:14:37
Surely OnConnectionOpened needs to remain on Chrom
Sergey Ulanov
2011/11/03 19:11:55
No, why? New connections are accepted in OnIncomin
| |
| 103 virtual void OnConnectionOpened(protocol::ConnectionToClient* client); | 104 virtual void OnConnectionOpened(protocol::ConnectionToClient* client); |
| 104 virtual void OnConnectionClosed(protocol::ConnectionToClient* client); | 105 virtual void OnConnectionClosed(protocol::ConnectionToClient* client); |
| 105 virtual void OnConnectionFailed(protocol::ConnectionToClient* client); | 106 virtual void OnConnectionFailed(protocol::ConnectionToClient* client); |
| 106 virtual void OnSequenceNumberUpdated(protocol::ConnectionToClient* client, | 107 virtual void OnSequenceNumberUpdated(protocol::ConnectionToClient* client, |
| 107 int64 sequence_number); | 108 int64 sequence_number); |
| 108 | 109 |
| 109 //////////////////////////////////////////////////////////////////////////// | 110 //////////////////////////////////////////////////////////////////////////// |
| 110 // SignalStrategy::StatusObserver implementation. | 111 // SignalStrategy::StatusObserver implementation. |
| 111 virtual void OnStateChange( | 112 virtual void OnStateChange( |
| 112 SignalStrategy::StatusObserver::State state) OVERRIDE; | 113 SignalStrategy::StatusObserver::State state) OVERRIDE; |
| 113 virtual void OnJidChange(const std::string& full_jid) OVERRIDE; | 114 virtual void OnJidChange(const std::string& full_jid) OVERRIDE; |
| 114 | 115 |
| 115 //////////////////////////////////////////////////////////////////////////// | 116 //////////////////////////////////////////////////////////////////////////// |
| 116 // ClientSession::EventHandler implementation. | 117 // ClientSession::EventHandler implementation. |
| 117 virtual void LocalLoginSucceeded( | 118 virtual void OnAuthenticationComplete( |
| 118 scoped_refptr<protocol::ConnectionToClient> client); | |
| 119 virtual void LocalLoginFailed( | |
| 120 scoped_refptr<protocol::ConnectionToClient> client); | 119 scoped_refptr<protocol::ConnectionToClient> client); |
| 121 | 120 |
| 122 // SessionManager::Listener implementation. | 121 // SessionManager::Listener implementation. |
| 123 virtual void OnSessionManagerInitialized() OVERRIDE; | 122 virtual void OnSessionManagerInitialized() OVERRIDE; |
| 124 virtual void OnIncomingSession( | 123 virtual void OnIncomingSession( |
| 125 protocol::Session* session, | 124 protocol::Session* session, |
| 126 protocol::SessionManager::IncomingSessionResponse* response) OVERRIDE; | 125 protocol::SessionManager::IncomingSessionResponse* response) OVERRIDE; |
| 127 | 126 |
| 128 void AddAuthenticatedClient( | 127 void AddAuthenticatedClient( |
| 129 scoped_refptr<protocol::ConnectionToClient> connection, | 128 scoped_refptr<protocol::ConnectionToClient> connection, |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 251 std::vector<Task*> shutdown_tasks_; | 250 std::vector<Task*> shutdown_tasks_; |
| 252 | 251 |
| 253 UiStrings ui_strings_; | 252 UiStrings ui_strings_; |
| 254 | 253 |
| 255 DISALLOW_COPY_AND_ASSIGN(ChromotingHost); | 254 DISALLOW_COPY_AND_ASSIGN(ChromotingHost); |
| 256 }; | 255 }; |
| 257 | 256 |
| 258 } // namespace remoting | 257 } // namespace remoting |
| 259 | 258 |
| 260 #endif // REMOTING_HOST_CHROMOTING_HOST_H_ | 259 #endif // REMOTING_HOST_CHROMOTING_HOST_H_ |
| OLD | NEW |