Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_IT2ME_IT2ME_HOST_H_ | 5 #ifndef REMOTING_HOST_IT2ME_IT2ME_HOST_H_ |
| 6 #define REMOTING_HOST_IT2ME_IT2ME_HOST_H_ | 6 #define REMOTING_HOST_IT2ME_IT2ME_HOST_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 30 class ChromotingHost; | 30 class ChromotingHost; |
| 31 class ChromotingHostContext; | 31 class ChromotingHostContext; |
| 32 class DesktopEnvironmentFactory; | 32 class DesktopEnvironmentFactory; |
| 33 class HostEventLogger; | 33 class HostEventLogger; |
| 34 class HostNPScriptObject; | 34 class HostNPScriptObject; |
| 35 class HostStatusLogger; | 35 class HostStatusLogger; |
| 36 class PolicyWatcher; | 36 class PolicyWatcher; |
| 37 class RegisterSupportHostRequest; | 37 class RegisterSupportHostRequest; |
| 38 class RsaKeyPair; | 38 class RsaKeyPair; |
| 39 | 39 |
| 40 // These state values are duplicated in host_session.js and the Android Java | 40 // These state values are duplicated in host_session.js. Remember to update |
| 41 // It2MeObserver class. Remember to update all copies when making changes. | 41 // both copies when making changes. |
| 42 enum It2MeHostState { | 42 enum It2MeHostState { |
| 43 kDisconnected, | 43 kDisconnected, |
| 44 kStarting, | 44 kStarting, |
| 45 kRequestedAccessCode, | 45 kRequestedAccessCode, |
| 46 kReceivedAccessCode, | 46 kReceivedAccessCode, |
| 47 kConnected, | 47 kConnected, |
| 48 kError, | 48 kError, |
| 49 kInvalidDomainError | 49 kInvalidDomainError, |
| 50 kConnecting, | |
|
Sergey Ulanov
2016/10/27 22:44:12
I don't think there is any reason to keep the curr
joedow
2016/10/31 17:16:07
I wanted to make sure that mismatched host/clients
Sergey Ulanov
2016/10/31 18:21:17
The state is sent from host to client as a string,
joedow
2016/10/31 18:58:39
Ah, I didn't expect that we were using a stringifi
| |
| 50 }; | 51 }; |
| 51 | 52 |
| 52 // Internal implementation of the plugin's It2Me host function. | 53 // Internal implementation of the plugin's It2Me host function. |
| 53 class It2MeHost : public base::RefCountedThreadSafe<It2MeHost>, | 54 class It2MeHost : public base::RefCountedThreadSafe<It2MeHost>, |
| 54 public HostStatusObserver { | 55 public HostStatusObserver { |
| 55 public: | 56 public: |
| 56 class Observer { | 57 class Observer { |
| 57 public: | 58 public: |
| 58 virtual void OnClientAuthenticated(const std::string& client_username) = 0; | 59 virtual void OnClientAuthenticated(const std::string& client_username) = 0; |
| 59 virtual void OnStoreAccessCode(const std::string& access_code, | 60 virtual void OnStoreAccessCode(const std::string& access_code, |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 220 const std::string& username, | 221 const std::string& username, |
| 221 const std::string& directory_bot_jid); | 222 const std::string& directory_bot_jid); |
| 222 | 223 |
| 223 private: | 224 private: |
| 224 DISALLOW_COPY_AND_ASSIGN(It2MeHostFactory); | 225 DISALLOW_COPY_AND_ASSIGN(It2MeHostFactory); |
| 225 }; | 226 }; |
| 226 | 227 |
| 227 } // namespace remoting | 228 } // namespace remoting |
| 228 | 229 |
| 229 #endif // REMOTING_HOST_IT2ME_IT2ME_HOST_H_ | 230 #endif // REMOTING_HOST_IT2ME_IT2ME_HOST_H_ |
| OLD | NEW |