| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_PAIRING_CONTROLLER_PAIRING_CONTROLLER_H_ | 5 #ifndef COMPONENTS_PAIRING_CONTROLLER_PAIRING_CONTROLLER_H_ |
| 6 #define COMPONENTS_PAIRING_CONTROLLER_PAIRING_CONTROLLER_H_ | 6 #define COMPONENTS_PAIRING_CONTROLLER_PAIRING_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 virtual void RepeatDiscovery() = 0; | 81 virtual void RepeatDiscovery() = 0; |
| 82 | 82 |
| 83 // Returns pairing confirmation code. | 83 // Returns pairing confirmation code. |
| 84 // Could be called only on |STATE_WAITING_FOR_CODE_CONFIRMATION| stage. | 84 // Could be called only on |STATE_WAITING_FOR_CODE_CONFIRMATION| stage. |
| 85 virtual std::string GetConfirmationCode() = 0; | 85 virtual std::string GetConfirmationCode() = 0; |
| 86 | 86 |
| 87 // Called to confirm or deny confirmation code. Can be called only on | 87 // Called to confirm or deny confirmation code. Can be called only on |
| 88 // |STAGE_WAITING_FOR_CODE_CONFIRMATION| stage. | 88 // |STAGE_WAITING_FOR_CODE_CONFIRMATION| stage. |
| 89 virtual void SetConfirmationCodeIsCorrect(bool correct) = 0; | 89 virtual void SetConfirmationCodeIsCorrect(bool correct) = 0; |
| 90 | 90 |
| 91 // Set the values that will be sent to the host to set its network. |
| 92 virtual void SetHostNetwork(const std::string& onc_spec) = 0; |
| 93 |
| 91 // Set the values that will be sent to the host if it needs to be configured. | 94 // Set the values that will be sent to the host if it needs to be configured. |
| 92 virtual void SetHostConfiguration(bool accepted_eula, | 95 virtual void SetHostConfiguration(bool accepted_eula, |
| 93 const std::string& lang, | 96 const std::string& lang, |
| 94 const std::string& timezone, | 97 const std::string& timezone, |
| 95 bool send_reports, | 98 bool send_reports, |
| 96 const std::string& keyboard_layout) = 0; | 99 const std::string& keyboard_layout) = 0; |
| 97 | 100 |
| 98 // Called when user successfully authenticated on GAIA page. Can be called | 101 // Called when user successfully authenticated on GAIA page. Can be called |
| 99 // only on |STAGE_WAITING_FOR_CREDENTIALS| stage. | 102 // only on |STAGE_WAITING_FOR_CREDENTIALS| stage. |
| 100 // |auth_token| will be sent to the host to be used for enrollment. | 103 // |auth_token| will be sent to the host to be used for enrollment. |
| 101 virtual void OnAuthenticationDone(const std::string& domain, | 104 virtual void OnAuthenticationDone(const std::string& domain, |
| 102 const std::string& auth_token) = 0; | 105 const std::string& auth_token) = 0; |
| 103 | 106 |
| 104 // Installs app and starts session. | 107 // Installs app and starts session. |
| 105 // Can be called only on |STAGE_HOST_ENROLLMENT_SUCCESS| stage. | 108 // Can be called only on |STAGE_HOST_ENROLLMENT_SUCCESS| stage. |
| 106 virtual void StartSession() = 0; | 109 virtual void StartSession() = 0; |
| 107 | 110 |
| 108 virtual void AddObserver(Observer* observer) = 0; | 111 virtual void AddObserver(Observer* observer) = 0; |
| 109 virtual void RemoveObserver(Observer* observer) = 0; | 112 virtual void RemoveObserver(Observer* observer) = 0; |
| 110 | 113 |
| 111 private: | 114 private: |
| 112 DISALLOW_COPY_AND_ASSIGN(ControllerPairingController); | 115 DISALLOW_COPY_AND_ASSIGN(ControllerPairingController); |
| 113 }; | 116 }; |
| 114 | 117 |
| 115 } // namespace pairing_chromeos | 118 } // namespace pairing_chromeos |
| 116 | 119 |
| 117 #endif // COMPONENTS_PAIRING_CONTROLLER_PAIRING_CONTROLLER_H_ | 120 #endif // COMPONENTS_PAIRING_CONTROLLER_PAIRING_CONTROLLER_H_ |
| OLD | NEW |