 Chromium Code Reviews
 Chromium Code Reviews Issue 1519883003:
  1) Add basic configuration (network connection, language, keyboard layout, timezone) setup page. 2)…  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master
    
  
    Issue 1519883003:
  1) Add basic configuration (network connection, language, keyboard layout, timezone) setup page. 2)…  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master| 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_HOST_PAIRING_CONTROLLER_H_ | 5 #ifndef COMPONENTS_PAIRING_HOST_PAIRING_CONTROLLER_H_ | 
| 6 #define COMPONENTS_PAIRING_HOST_PAIRING_CONTROLLER_H_ | 6 #define COMPONENTS_PAIRING_HOST_PAIRING_CONTROLLER_H_ | 
| 7 | 7 | 
| 8 #include <string> | 8 #include <string> | 
| 9 | 9 | 
| 10 #include "base/macros.h" | 10 #include "base/macros.h" | 
| 11 | 11 | 
| 12 namespace pairing_chromeos { | 12 namespace pairing_chromeos { | 
| 13 | 13 | 
| 14 class HostPairingController { | 14 class HostPairingController { | 
| 15 public: | 15 public: | 
| 16 enum Stage { | 16 enum Stage { | 
| 17 STAGE_NONE, | 17 STAGE_NONE, | 
| 18 STAGE_INITIALIZATION_ERROR, | 18 STAGE_INITIALIZATION_ERROR, | 
| 19 STAGE_WAITING_FOR_CONTROLLER, | 19 STAGE_WAITING_FOR_CONTROLLER, | 
| 20 STAGE_WAITING_FOR_CODE_CONFIRMATION, | 20 STAGE_WAITING_FOR_CODE_CONFIRMATION, | 
| 21 STAGE_SETUP_BASIC_CONFIGURATION, | |
| 22 STAGE_SETUP_NETWOKR_ERROR, | |
| 21 STAGE_WAITING_FOR_CONTROLLER_AFTER_UPDATE, | 23 STAGE_WAITING_FOR_CONTROLLER_AFTER_UPDATE, | 
| 22 STAGE_WAITING_FOR_CREDENTIALS, | 24 STAGE_WAITING_FOR_CREDENTIALS, | 
| 23 STAGE_ENROLLING, | 25 STAGE_ENROLLING, | 
| 24 STAGE_ENROLLMENT_ERROR, | 26 STAGE_ENROLLMENT_ERROR, | 
| 25 STAGE_ENROLLMENT_SUCCESS, | 27 STAGE_ENROLLMENT_SUCCESS, | 
| 26 STAGE_FINISHED | 28 STAGE_FINISHED | 
| 27 }; | 29 }; | 
| 28 | 30 | 
| 29 enum UpdateStatus { | 31 enum UpdateStatus { | 
| 30 UPDATE_STATUS_UNKNOWN, | 32 UPDATE_STATUS_UNKNOWN, | 
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 64 private: | 66 private: | 
| 65 DISALLOW_COPY_AND_ASSIGN(Observer); | 67 DISALLOW_COPY_AND_ASSIGN(Observer); | 
| 66 }; | 68 }; | 
| 67 | 69 | 
| 68 HostPairingController(); | 70 HostPairingController(); | 
| 69 virtual ~HostPairingController(); | 71 virtual ~HostPairingController(); | 
| 70 | 72 | 
| 71 // Returns current stage of pairing process. | 73 // Returns current stage of pairing process. | 
| 72 virtual Stage GetCurrentStage() = 0; | 74 virtual Stage GetCurrentStage() = 0; | 
| 73 | 75 | 
| 76 // Set current stage and notify its observers the stage has changed. | |
| 77 virtual void ChangeStage(Stage new_stage) = 0; | |
| 
dzhioev (left Google)
2015/12/15 23:07:23
This method shouldn't be in a public interface. Ch
 | |
| 78 | |
| 74 // Starts pairing process. Can be called only on |STAGE_NONE| stage. | 79 // Starts pairing process. Can be called only on |STAGE_NONE| stage. | 
| 75 virtual void StartPairing() = 0; | 80 virtual void StartPairing() = 0; | 
| 76 | 81 | 
| 77 // Returns device name. | 82 // Returns device name. | 
| 78 virtual std::string GetDeviceName() = 0; | 83 virtual std::string GetDeviceName() = 0; | 
| 79 | 84 | 
| 80 // Returns 6-digit confirmation code. Can be called only on | 85 // Returns 6-digit confirmation code. Can be called only on | 
| 81 // |STAGE_WAITING_FOR_CODE_CONFIRMATION| stage. | 86 // |STAGE_WAITING_FOR_CODE_CONFIRMATION| stage. | 
| 82 virtual std::string GetConfirmationCode() = 0; | 87 virtual std::string GetConfirmationCode() = 0; | 
| 83 | 88 | 
| (...skipping 15 matching lines...) Expand all Loading... | |
| 99 virtual void AddObserver(Observer* observer) = 0; | 104 virtual void AddObserver(Observer* observer) = 0; | 
| 100 virtual void RemoveObserver(Observer* observer) = 0; | 105 virtual void RemoveObserver(Observer* observer) = 0; | 
| 101 | 106 | 
| 102 private: | 107 private: | 
| 103 DISALLOW_COPY_AND_ASSIGN(HostPairingController); | 108 DISALLOW_COPY_AND_ASSIGN(HostPairingController); | 
| 104 }; | 109 }; | 
| 105 | 110 | 
| 106 } // namespace pairing_chromeos | 111 } // namespace pairing_chromeos | 
| 107 | 112 | 
| 108 #endif // COMPONENTS_PAIRING_HOST_PAIRING_CONTROLLER_H_ | 113 #endif // COMPONENTS_PAIRING_HOST_PAIRING_CONTROLLER_H_ | 
| OLD | NEW |