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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_HOST_PAIRING_SCREEN_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_HOST_PAIRING_SCREEN_H_
8 #include "base/macros.h"
9 #include "chrome/browser/chromeos/login/screens/host_pairing_screen_actor.h"
10 #include "chrome/browser/chromeos/login/screens/screen_context.h"
11 #include "chrome/browser/chromeos/login/screens/wizard_screen.h"
12 #include "components/pairing/host_pairing_controller.h"
16 class HostPairingScreen :
18 public pairing_chromeos::HostPairingController::Observer,
19 public HostPairingScreenActor::Delegate {
21 HostPairingScreen(ScreenObserver* observer, HostPairingScreenActor* actor,
22 pairing_chromeos::HostPairingController* controller);
23 virtual ~HostPairingScreen();
26 typedef pairing_chromeos::HostPairingController::Stage Stage;
28 void CommitContextChanges();
30 // Overridden from WizardScreen:
31 virtual void PrepareToShow() OVERRIDE;
32 virtual void Show() OVERRIDE;
33 virtual void Hide() OVERRIDE;
34 virtual std::string GetName() const OVERRIDE;
36 // pairing_chromeos::HostPairingController::Observer:
37 virtual void PairingStageChanged(Stage new_stage) OVERRIDE;
38 virtual void ConfigureHost(bool accepted_eula,
39 const std::string& lang,
40 const std::string& timezone,
42 const std::string& keyboard_layout) OVERRIDE;
43 virtual void EnrollHost(const std::string& auth_token) OVERRIDE;
45 // Overridden from ControllerPairingView::Delegate:
46 virtual void OnActorDestroyed(HostPairingScreenActor* actor) OVERRIDE;
48 // Context for sharing data between C++ and JS.
49 // TODO(dzhioev): move to BaseScreen when possible.
50 ScreenContext context_;
52 HostPairingScreenActor* actor_;
54 // Controller performing pairing. Owned by the wizard controller.
55 pairing_chromeos::HostPairingController* controller_;
57 // Current stage of pairing process.
60 DISALLOW_COPY_AND_ASSIGN(HostPairingScreen);
63 } // namespace chromeos
65 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_HOST_PAIRING_SCREEN_H_