OLD | NEW |
| (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 // Keep these constants synced with corresponding constants defined in | |
25 // oobe_screen_controller_pairing.js. | |
26 // Context keys. | |
27 extern const char kContextKeyPage[]; | |
28 extern const char kContextKeyControlsDisabled[]; | |
29 extern const char kContextKeyDevices[]; | |
30 extern const char kContextKeyConfirmationCode[]; | |
31 extern const char kContextKeySelectedDevice[]; | |
32 extern const char kContextKeyAccountId[]; | |
33 extern const char kContextKeyEnrollmentDomain[]; | |
34 | |
35 // Pages names. | |
36 extern const char kPageDevicesDiscovery[]; | |
37 extern const char kPageDeviceSelect[]; | |
38 extern const char kPageDeviceNotFound[]; | |
39 extern const char kPageEstablishingConnection[]; | |
40 extern const char kPageEstablishingConnectionError[]; | |
41 extern const char kPageCodeConfirmation[]; | |
42 extern const char kPageHostNetworkError[]; | |
43 extern const char kPageHostUpdate[]; | |
44 extern const char kPageHostConnectionLost[]; | |
45 extern const char kPageEnrollmentIntroduction[]; | |
46 extern const char kPageAuthentication[]; | |
47 extern const char kPageHostEnrollment[]; | |
48 extern const char kPageHostEnrollmentError[]; | |
49 extern const char kPagePairingDone[]; | |
50 | |
51 // Actions names. | |
52 extern const char kActionChooseDevice[]; | |
53 extern const char kActionRepeatDiscovery[]; | |
54 extern const char kActionAcceptCode[]; | |
55 extern const char kActionRejectCode[]; | |
56 extern const char kActionProceedToAuthentication[]; | |
57 extern const char kActionEnroll[]; | |
58 extern const char kActionStartSession[]; | |
59 | |
60 } // namespace controller_pairing | |
61 | |
62 class ControllerPairingScreenActor { | |
63 public: | |
64 class Delegate { | |
65 public: | |
66 virtual ~Delegate() {} | |
67 virtual void OnActorDestroyed(ControllerPairingScreenActor* actor) = 0; | |
68 virtual void OnScreenContextChanged(const base::DictionaryValue& diff) = 0; | |
69 virtual void OnUserActed(const std::string& action) = 0; | |
70 }; | |
71 | |
72 ControllerPairingScreenActor(); | |
73 virtual ~ControllerPairingScreenActor(); | |
74 | |
75 virtual void Show() = 0; | |
76 virtual void Hide() = 0; | |
77 virtual void SetDelegate(Delegate* delegate) = 0; | |
78 virtual void OnContextChanged(const base::DictionaryValue& diff) = 0; | |
79 virtual content::BrowserContext* GetBrowserContext() = 0; | |
80 | |
81 private: | |
82 DISALLOW_COPY_AND_ASSIGN(ControllerPairingScreenActor); | |
83 }; | |
84 | |
85 } // namespace chromeos | |
86 | |
87 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_CONTROLLER_PAIRING_SCREEN_ACTOR
_H_ | |
OLD | NEW |