Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(387)

Side by Side Diff: chrome/browser/chromeos/login/screens/controller_pairing_screen.h

Issue 326933004: Example of usage of new features of context and screen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_CONTROLLER_PAIRING_SCREEN_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_CONTROLLER_PAIRING_SCREEN_H_
7
8 #include "base/macros.h"
9
10 #include "chrome/browser/chromeos/login/screens/controller_pairing_screen_actor. h"
11 #include "chrome/browser/chromeos/login/screens/screen_context.h"
12 #include "chrome/browser/chromeos/login/screens/wizard_screen.h"
13 #include "chromeos/pairing/controller_pairing_flow.h"
14
15 namespace chromeos {
16
17 class ControllerPairingScreen : public WizardScreen,
18 public ControllerPairingFlow::Observer,
19 public ControllerPairingScreenActor::Delegate {
20 public:
21 ControllerPairingScreen(ScreenObserver* observer,
22 ControllerPairingScreenActor* actor);
23 virtual ~ControllerPairingScreen();
24
25 private:
26 typedef ControllerPairingFlow::Stage Stage;
27
28 void CommitContextChanges();
29 bool ExpectStageIs(Stage stage) const;
30
31 // Overridden from WizardScreen:
32 virtual void PrepareToShow() OVERRIDE;
33 virtual void Show() OVERRIDE;
34 virtual void Hide() OVERRIDE;
35 virtual std::string GetName() const OVERRIDE;
36
37 // Overridden from ControllerPairingFlow::Observer:
38 virtual void PairingStageChanged(Stage new_stage) OVERRIDE;
39 virtual void DiscoveredDevicesListChanged() OVERRIDE;
40
41 // Overridden from ControllerPairingView::Delegate:
42 virtual void OnActorDestroyed(ControllerPairingScreenActor* actor) OVERRIDE;
43 virtual void OnScreenContextChanged(
44 const base::DictionaryValue& diff) OVERRIDE;
45 virtual void OnButtonClicked(const std::string& action) OVERRIDE;
46
47 ScreenContext context_;
48 ControllerPairingScreenActor* actor_;
49 scoped_ptr<ControllerPairingFlow> flow_;
50 Stage current_stage_;
51 bool device_preselected_;
52
53 DISALLOW_COPY_AND_ASSIGN(ControllerPairingScreen);
54 };
55
56 } // namespace chromeos
57
58 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_CONTROLLER_PAIRING_SCREEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698