OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_KIOSK_ENABLE_SCREEN_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_KIOSK_ENABLE_SCREEN_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_KIOSK_ENABLE_SCREEN_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_KIOSK_ENABLE_SCREEN_HANDLER_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" | 10 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" |
11 #include "chrome/browser/chromeos/login/screens/kiosk_enable_screen_actor.h" | 11 #include "chrome/browser/chromeos/login/screens/kiosk_enable_screen_actor.h" |
12 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" | 12 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" |
13 | 13 |
14 namespace chromeos { | 14 namespace chromeos { |
15 | 15 |
16 // WebUI implementation of KioskEnableScreenActor. | 16 // WebUI implementation of KioskEnableScreenActor. |
17 class KioskEnableScreenHandler : public KioskEnableScreenActor, | 17 class KioskEnableScreenHandler : public KioskEnableScreenActor, |
18 public BaseScreenHandler { | 18 public BaseScreenHandler { |
19 public: | 19 public: |
20 KioskEnableScreenHandler(); | 20 KioskEnableScreenHandler(); |
21 virtual ~KioskEnableScreenHandler(); | 21 virtual ~KioskEnableScreenHandler(); |
22 | 22 |
23 // KioskEnableScreenActor implementation: | 23 // KioskEnableScreenActor implementation: |
24 virtual void Show() OVERRIDE; | 24 virtual void Show() override; |
25 virtual void SetDelegate(Delegate* delegate) OVERRIDE; | 25 virtual void SetDelegate(Delegate* delegate) override; |
26 | 26 |
27 // BaseScreenHandler implementation: | 27 // BaseScreenHandler implementation: |
28 virtual void DeclareLocalizedValues(LocalizedValuesBuilder* builder) OVERRIDE; | 28 virtual void DeclareLocalizedValues(LocalizedValuesBuilder* builder) override; |
29 virtual void Initialize() OVERRIDE; | 29 virtual void Initialize() override; |
30 | 30 |
31 // WebUIMessageHandler implementation: | 31 // WebUIMessageHandler implementation: |
32 virtual void RegisterMessages() OVERRIDE; | 32 virtual void RegisterMessages() override; |
33 | 33 |
34 private: | 34 private: |
35 // JS messages handlers. | 35 // JS messages handlers. |
36 void HandleOnClose(); | 36 void HandleOnClose(); |
37 void HandleOnEnable(); | 37 void HandleOnEnable(); |
38 | 38 |
39 // Callback for KioskAppManager::EnableConsumerModeKiosk(). | 39 // Callback for KioskAppManager::EnableConsumerModeKiosk(). |
40 void OnEnableConsumerKioskAutoLaunch(bool success); | 40 void OnEnableConsumerKioskAutoLaunch(bool success); |
41 | 41 |
42 // Callback for KioskAppManager::GetConsumerKioskModeStatus(). | 42 // Callback for KioskAppManager::GetConsumerKioskModeStatus(). |
43 void OnGetConsumerKioskAutoLaunchStatus( | 43 void OnGetConsumerKioskAutoLaunchStatus( |
44 KioskAppManager::ConsumerKioskAutoLaunchStatus status); | 44 KioskAppManager::ConsumerKioskAutoLaunchStatus status); |
45 | 45 |
46 Delegate* delegate_; | 46 Delegate* delegate_; |
47 | 47 |
48 // Keeps whether screen should be shown right after initialization. | 48 // Keeps whether screen should be shown right after initialization. |
49 bool show_on_init_; | 49 bool show_on_init_; |
50 | 50 |
51 // True if machine's consumer kiosk mode is in a configurable state. | 51 // True if machine's consumer kiosk mode is in a configurable state. |
52 bool is_configurable_; | 52 bool is_configurable_; |
53 | 53 |
54 base::WeakPtrFactory<KioskEnableScreenHandler> weak_ptr_factory_; | 54 base::WeakPtrFactory<KioskEnableScreenHandler> weak_ptr_factory_; |
55 | 55 |
56 DISALLOW_COPY_AND_ASSIGN(KioskEnableScreenHandler); | 56 DISALLOW_COPY_AND_ASSIGN(KioskEnableScreenHandler); |
57 }; | 57 }; |
58 | 58 |
59 } // namespace chromeos | 59 } // namespace chromeos |
60 | 60 |
61 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_KIOSK_ENABLE_SCREEN_HANDLER_H_ | 61 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_KIOSK_ENABLE_SCREEN_HANDLER_H_ |
OLD | NEW |