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 "components/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 : | 16 class HostPairingScreen : |
17 public WizardScreen, | 17 public WizardScreen, |
18 public pairing_chromeos::HostPairingController::Observer, | 18 public pairing_chromeos::HostPairingController::Observer, |
19 public HostPairingScreenActor::Delegate { | 19 public HostPairingScreenActor::Delegate { |
20 public: | 20 public: |
21 HostPairingScreen(ScreenObserver* observer, HostPairingScreenActor* actor); | 21 HostPairingScreen(ScreenObserver* observer, HostPairingScreenActor* actor, |
| 22 pairing_chromeos::HostPairingController* controller); |
22 virtual ~HostPairingScreen(); | 23 virtual ~HostPairingScreen(); |
23 | 24 |
24 private: | 25 private: |
25 typedef pairing_chromeos::HostPairingController::Stage Stage; | 26 typedef pairing_chromeos::HostPairingController::Stage Stage; |
26 | 27 |
27 void CommitContextChanges(); | 28 void CommitContextChanges(); |
28 | 29 |
29 // Overridden from WizardScreen: | 30 // Overridden from WizardScreen: |
30 virtual void PrepareToShow() OVERRIDE; | 31 virtual void PrepareToShow() OVERRIDE; |
31 virtual void Show() OVERRIDE; | 32 virtual void Show() OVERRIDE; |
(...skipping 11 matching lines...) Expand all Loading... |
43 | 44 |
44 // Overridden from ControllerPairingView::Delegate: | 45 // Overridden from ControllerPairingView::Delegate: |
45 virtual void OnActorDestroyed(HostPairingScreenActor* actor) OVERRIDE; | 46 virtual void OnActorDestroyed(HostPairingScreenActor* actor) OVERRIDE; |
46 | 47 |
47 // Context for sharing data between C++ and JS. | 48 // Context for sharing data between C++ and JS. |
48 // TODO(dzhioev): move to BaseScreen when possible. | 49 // TODO(dzhioev): move to BaseScreen when possible. |
49 ScreenContext context_; | 50 ScreenContext context_; |
50 | 51 |
51 HostPairingScreenActor* actor_; | 52 HostPairingScreenActor* actor_; |
52 | 53 |
53 // Controller performing pairing. Owned by the screen for now. | 54 // Controller performing pairing. Owned by the wizard controller. |
54 // TODO(dzhioev): move to proper place later. | 55 pairing_chromeos::HostPairingController* controller_; |
55 scoped_ptr<pairing_chromeos::HostPairingController> controller_; | |
56 | 56 |
57 // Current stage of pairing process. | 57 // Current stage of pairing process. |
58 Stage current_stage_; | 58 Stage current_stage_; |
59 | 59 |
60 DISALLOW_COPY_AND_ASSIGN(HostPairingScreen); | 60 DISALLOW_COPY_AND_ASSIGN(HostPairingScreen); |
61 }; | 61 }; |
62 | 62 |
63 } // namespace chromeos | 63 } // namespace chromeos |
64 | 64 |
65 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_HOST_PAIRING_SCREEN_H_ | 65 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_HOST_PAIRING_SCREEN_H_ |
OLD | NEW |