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

Side by Side Diff: chrome/browser/chromeos/login/screens/controller_pairing_screen_actor.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_ACTOR_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_CONTROLLER_PAIRING_SCREEN_ACTOR_H_
7
8 #include <string>
9
10 #include "base/macros.h"
11
12 namespace base {
13 class DictionaryValue;
14 }
15
16 namespace content {
17 class BrowserContext;
18 }
19
20 namespace chromeos {
21
22 namespace controller_pairing {
23
24 // Context keys.
25 extern const char kContextKeyPage[];
26 extern const char kContextKeyControlsDisabled[];
27 extern const char kContextKeyDevices[];
28 extern const char kContextKeyConfirmationCode[];
29 extern const char kContextKeySelectedDevice[];
30 extern const char kContextKeyAccountId[];
31
32 // Pages names.
33 extern const char kPageDevicesDiscovery[];
34 extern const char kPageDeviceSelect[];
35 extern const char kPageDeviceNotFound[];
36 extern const char kPageEstablishingConnection[];
37 extern const char kPageEstablishingConnectionError[];
38 extern const char kPageCodeConfirmation[];
39 extern const char kPageHostUpdate[];
40 extern const char kPageHostConnectionLost[];
41 extern const char kPageEnrlollmentIntroduction[];
42 extern const char kPageAuthentication[];
43 extern const char kPageHostEnrollment[];
44 extern const char kPageHostEnrollmentError[];
45 extern const char kPagePairingDone[];
46
47 // Actions names.
48 extern const char kActionChooseDevice[];
49 extern const char kActionRepeatDiscovery[];
50 extern const char kActionAcceptCode[];
51 extern const char kActionRejectCode[];
52 extern const char kActionProceedToAuthentication[];
53 extern const char kActionEnroll[];
54 extern const char kActionStartSession[];
55
56 } // namespace conroller_pairing
57
58 class ControllerPairingScreenActor {
59 public:
60 class Delegate {
61 public:
62 virtual ~Delegate() {}
63 virtual void OnActorDestroyed(ControllerPairingScreenActor* actor) = 0;
64 virtual void OnScreenContextChanged(const base::DictionaryValue& diff) = 0;
65 virtual void OnButtonClicked(const std::string& action) = 0;
66 };
67
68 ControllerPairingScreenActor();
69 virtual ~ControllerPairingScreenActor();
70
71 virtual void Show() = 0;
72 virtual void Hide() = 0;
73 virtual void SetDelegate(Delegate* delegate) = 0;
74 virtual void OnContextChanged(const base::DictionaryValue& diff) = 0;
75 virtual content::BrowserContext* GetBrowserContext() = 0;
76
77 private:
78 DISALLOW_COPY_AND_ASSIGN(ControllerPairingScreenActor);
79 };
80
81 } // namespace chromeos
82
83 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_CONTROLLER_PAIRING_SCREEN_ACTOR _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698