Index: chrome/browser/chromeos/login/screens/controller_pairing_screen.h |
diff --git a/chrome/browser/chromeos/login/screens/controller_pairing_screen.h b/chrome/browser/chromeos/login/screens/controller_pairing_screen.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f9443f5a48a3e2e13334a95a6735546765ed2f30 |
--- /dev/null |
+++ b/chrome/browser/chromeos/login/screens/controller_pairing_screen.h |
@@ -0,0 +1,58 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_CONTROLLER_PAIRING_SCREEN_H_ |
+#define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_CONTROLLER_PAIRING_SCREEN_H_ |
+ |
+#include "base/macros.h" |
+ |
+#include "chrome/browser/chromeos/login/screens/controller_pairing_screen_actor.h" |
+#include "chrome/browser/chromeos/login/screens/screen_context.h" |
+#include "chrome/browser/chromeos/login/screens/wizard_screen.h" |
+#include "chromeos/pairing/controller_pairing_flow.h" |
+ |
+namespace chromeos { |
+ |
+class ControllerPairingScreen : public WizardScreen, |
+ public ControllerPairingFlow::Observer, |
+ public ControllerPairingScreenActor::Delegate { |
+ public: |
+ ControllerPairingScreen(ScreenObserver* observer, |
+ ControllerPairingScreenActor* actor); |
+ virtual ~ControllerPairingScreen(); |
+ |
+ private: |
+ typedef ControllerPairingFlow::Stage Stage; |
+ |
+ void CommitContextChanges(); |
+ bool ExpectStageIs(Stage stage) const; |
+ |
+ // Overridden from WizardScreen: |
+ virtual void PrepareToShow() OVERRIDE; |
+ virtual void Show() OVERRIDE; |
+ virtual void Hide() OVERRIDE; |
+ virtual std::string GetName() const OVERRIDE; |
+ |
+ // Overridden from ControllerPairingFlow::Observer: |
+ virtual void PairingStageChanged(Stage new_stage) OVERRIDE; |
+ virtual void DiscoveredDevicesListChanged() OVERRIDE; |
+ |
+ // Overridden from ControllerPairingView::Delegate: |
+ virtual void OnActorDestroyed(ControllerPairingScreenActor* actor) OVERRIDE; |
+ virtual void OnScreenContextChanged( |
+ const base::DictionaryValue& diff) OVERRIDE; |
+ virtual void OnButtonClicked(const std::string& action) OVERRIDE; |
+ |
+ ScreenContext context_; |
+ ControllerPairingScreenActor* actor_; |
+ scoped_ptr<ControllerPairingFlow> flow_; |
+ Stage current_stage_; |
+ bool device_preselected_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(ControllerPairingScreen); |
+}; |
+ |
+} // namespace chromeos |
+ |
+#endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_CONTROLLER_PAIRING_SCREEN_H_ |