| 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 CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_HOST_PAIRING_SCREEN_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_HOST_PAIRING_SCREEN_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_HOST_PAIRING_SCREEN_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_HOST_PAIRING_SCREEN_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "chrome/browser/chromeos/login/screens/host_pairing_screen_actor.h" | 9 #include "chrome/browser/chromeos/login/screens/host_pairing_screen_actor.h" |
| 10 #include "chrome/browser/chromeos/login/screens/screen_context.h" | 10 #include "chrome/browser/chromeos/login/screens/screen_context.h" |
| 11 #include "chrome/browser/chromeos/login/screens/wizard_screen.h" | 11 #include "chrome/browser/chromeos/login/screens/wizard_screen.h" |
| 12 #include "chromeos/pairing/host_pairing_controller.h" | 12 #include "components/pairing/host_pairing_controller.h" |
| 13 | 13 |
| 14 namespace chromeos { | 14 namespace chromeos { |
| 15 | 15 |
| 16 class HostPairingScreen : public WizardScreen, | 16 class HostPairingScreen : |
| 17 public HostPairingController::Observer, | 17 public WizardScreen, |
| 18 public HostPairingScreenActor::Delegate { | 18 public pairing_chromeos::HostPairingController::Observer, |
| 19 public HostPairingScreenActor::Delegate { |
| 19 public: | 20 public: |
| 20 HostPairingScreen(ScreenObserver* observer, HostPairingScreenActor* actor); | 21 HostPairingScreen(ScreenObserver* observer, HostPairingScreenActor* actor); |
| 21 virtual ~HostPairingScreen(); | 22 virtual ~HostPairingScreen(); |
| 22 | 23 |
| 23 private: | 24 private: |
| 24 typedef HostPairingController::Stage Stage; | 25 typedef pairing_chromeos::HostPairingController::Stage Stage; |
| 25 typedef HostPairingController::UpdateProgress UpdateProgress; | 26 typedef pairing_chromeos::HostPairingController::UpdateProgress |
| 27 UpdateProgress; |
| 26 | 28 |
| 27 void CommitContextChanges(); | 29 void CommitContextChanges(); |
| 28 | 30 |
| 29 // Overridden from WizardScreen: | 31 // Overridden from WizardScreen: |
| 30 virtual void PrepareToShow() OVERRIDE; | 32 virtual void PrepareToShow() OVERRIDE; |
| 31 virtual void Show() OVERRIDE; | 33 virtual void Show() OVERRIDE; |
| 32 virtual void Hide() OVERRIDE; | 34 virtual void Hide() OVERRIDE; |
| 33 virtual std::string GetName() const OVERRIDE; | 35 virtual std::string GetName() const OVERRIDE; |
| 34 | 36 |
| 35 // Overridden from HostPairingController::Observer: | 37 // Overridden from pairing_chromeos::HostPairingController::Observer: |
| 36 virtual void PairingStageChanged(Stage new_stage) OVERRIDE; | 38 virtual void PairingStageChanged(Stage new_stage) OVERRIDE; |
| 37 virtual void UpdateAdvanced(const UpdateProgress& progress) OVERRIDE; | 39 virtual void UpdateAdvanced(const UpdateProgress& progress) OVERRIDE; |
| 38 | 40 |
| 39 // Overridden from ControllerPairingView::Delegate: | 41 // Overridden from ControllerPairingView::Delegate: |
| 40 virtual void OnActorDestroyed(HostPairingScreenActor* actor) OVERRIDE; | 42 virtual void OnActorDestroyed(HostPairingScreenActor* actor) OVERRIDE; |
| 41 | 43 |
| 42 // Context for sharing data between C++ and JS. | 44 // Context for sharing data between C++ and JS. |
| 43 // TODO(dzhioev): move to BaseScreen when possible. | 45 // TODO(dzhioev): move to BaseScreen when possible. |
| 44 ScreenContext context_; | 46 ScreenContext context_; |
| 45 | 47 |
| 46 HostPairingScreenActor* actor_; | 48 HostPairingScreenActor* actor_; |
| 47 | 49 |
| 48 // Controller performing pairing. Owned by the screen for now. | 50 // Controller performing pairing. Owned by the screen for now. |
| 49 // TODO(dzhioev): move to proper place later. | 51 // TODO(dzhioev): move to proper place later. |
| 50 scoped_ptr<HostPairingController> controller_; | 52 scoped_ptr<pairing_chromeos::HostPairingController> controller_; |
| 51 | 53 |
| 52 // Current stage of pairing process. | 54 // Current stage of pairing process. |
| 53 Stage current_stage_; | 55 Stage current_stage_; |
| 54 | 56 |
| 55 DISALLOW_COPY_AND_ASSIGN(HostPairingScreen); | 57 DISALLOW_COPY_AND_ASSIGN(HostPairingScreen); |
| 56 }; | 58 }; |
| 57 | 59 |
| 58 } // namespace chromeos | 60 } // namespace chromeos |
| 59 | 61 |
| 60 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_HOST_PAIRING_SCREEN_H_ | 62 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_HOST_PAIRING_SCREEN_H_ |
| OLD | NEW |