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_APP_MENU_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_KIOSK_APP_MENU_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_KIOSK_APP_MENU_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_KIOSK_APP_MENU_HANDLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 public KioskAppManagerObserver, | 25 public KioskAppManagerObserver, |
26 public NetworkStateInformer::NetworkStateInformerObserver { | 26 public NetworkStateInformer::NetworkStateInformerObserver { |
27 public: | 27 public: |
28 explicit KioskAppMenuHandler( | 28 explicit KioskAppMenuHandler( |
29 const scoped_refptr<NetworkStateInformer>& network_state_informer); | 29 const scoped_refptr<NetworkStateInformer>& network_state_informer); |
30 virtual ~KioskAppMenuHandler(); | 30 virtual ~KioskAppMenuHandler(); |
31 | 31 |
32 void GetLocalizedStrings(base::DictionaryValue* localized_strings); | 32 void GetLocalizedStrings(base::DictionaryValue* localized_strings); |
33 | 33 |
34 // content::WebUIMessageHandler overrides: | 34 // content::WebUIMessageHandler overrides: |
35 virtual void RegisterMessages() OVERRIDE; | 35 virtual void RegisterMessages() override; |
36 | 36 |
37 // Returns true if new kiosk UI is enabled. | 37 // Returns true if new kiosk UI is enabled. |
38 static bool EnableNewKioskUI(); | 38 static bool EnableNewKioskUI(); |
39 | 39 |
40 private: | 40 private: |
41 // Sends all kiosk apps to webui. | 41 // Sends all kiosk apps to webui. |
42 void SendKioskApps(); | 42 void SendKioskApps(); |
43 | 43 |
44 // JS callbacks. | 44 // JS callbacks. |
45 void HandleInitializeKioskApps(const base::ListValue* args); | 45 void HandleInitializeKioskApps(const base::ListValue* args); |
46 void HandleKioskAppsLoaded(const base::ListValue* args); | 46 void HandleKioskAppsLoaded(const base::ListValue* args); |
47 void HandleCheckKioskAppLaunchError(const base::ListValue* args); | 47 void HandleCheckKioskAppLaunchError(const base::ListValue* args); |
48 | 48 |
49 // KioskAppManagerObserver overrides: | 49 // KioskAppManagerObserver overrides: |
50 virtual void OnKioskAppsSettingsChanged() OVERRIDE; | 50 virtual void OnKioskAppsSettingsChanged() override; |
51 virtual void OnKioskAppDataChanged(const std::string& app_id) OVERRIDE; | 51 virtual void OnKioskAppDataChanged(const std::string& app_id) override; |
52 | 52 |
53 // NetworkStateInformer::NetworkStateInformerObserver overrides: | 53 // NetworkStateInformer::NetworkStateInformerObserver overrides: |
54 virtual void UpdateState(ErrorScreenActor::ErrorReason reason) OVERRIDE; | 54 virtual void UpdateState(ErrorScreenActor::ErrorReason reason) override; |
55 | 55 |
56 // True when WebUI is initialized. Otherwise don't allow calling JS functions. | 56 // True when WebUI is initialized. Otherwise don't allow calling JS functions. |
57 bool is_webui_initialized_; | 57 bool is_webui_initialized_; |
58 | 58 |
59 scoped_refptr<NetworkStateInformer> network_state_informer_; | 59 scoped_refptr<NetworkStateInformer> network_state_informer_; |
60 | 60 |
61 base::WeakPtrFactory<KioskAppMenuHandler> weak_ptr_factory_; | 61 base::WeakPtrFactory<KioskAppMenuHandler> weak_ptr_factory_; |
62 | 62 |
63 DISALLOW_COPY_AND_ASSIGN(KioskAppMenuHandler); | 63 DISALLOW_COPY_AND_ASSIGN(KioskAppMenuHandler); |
64 }; | 64 }; |
65 | 65 |
66 } // namespace chromeos | 66 } // namespace chromeos |
67 | 67 |
68 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_KIOSK_APP_MENU_HANDLER_H_ | 68 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_KIOSK_APP_MENU_HANDLER_H_ |
OLD | NEW |