| 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_EXTENSIONS_CHROMEOS_KIOSK_APPS_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_EXTENSIONS_CHROMEOS_KIOSK_APPS_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_EXTENSIONS_CHROMEOS_KIOSK_APPS_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_EXTENSIONS_CHROMEOS_KIOSK_APPS_HANDLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 12 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" | 12 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" |
| 13 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager_observer.h" | 13 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager_observer.h" |
| 14 #include "content/public/browser/web_ui_message_handler.h" | 14 #include "content/public/browser/web_ui_message_handler.h" |
| 15 | 15 |
| 16 namespace base { | 16 namespace base { |
| 17 class DictionaryValue; | 17 class DictionaryValue; |
| 18 class ListValue; | 18 class ListValue; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace content { | 21 namespace content { |
| 22 class WebUIDataSource; | 22 class WebUIDataSource; |
| 23 } | 23 } |
| 24 | 24 |
| 25 namespace chromeos { | 25 namespace chromeos { |
| 26 | 26 |
| 27 class KioskAppManager; | 27 class KioskAppManager; |
| 28 class OwnerSettingsServiceChromeOS; |
| 28 | 29 |
| 29 class KioskAppsHandler : public content::WebUIMessageHandler, | 30 class KioskAppsHandler : public content::WebUIMessageHandler, |
| 30 public KioskAppManagerObserver { | 31 public KioskAppManagerObserver { |
| 31 public: | 32 public: |
| 32 KioskAppsHandler(); | 33 KioskAppsHandler(); |
| 33 ~KioskAppsHandler() override; | 34 ~KioskAppsHandler() override; |
| 34 | 35 |
| 35 void GetLocalizedValues(content::WebUIDataSource* source); | 36 void GetLocalizedValues(content::WebUIDataSource* source); |
| 36 | 37 |
| 37 // content::WebUIMessageHandler overrides: | 38 // content::WebUIMessageHandler overrides: |
| (...skipping 24 matching lines...) Expand all Loading... |
| 62 void ShowError(const std::string& app_id); | 63 void ShowError(const std::string& app_id); |
| 63 | 64 |
| 64 // Callback for KioskAppManager::GetConsumerKioskModeStatus(). | 65 // Callback for KioskAppManager::GetConsumerKioskModeStatus(). |
| 65 void OnGetConsumerKioskAutoLaunchStatus( | 66 void OnGetConsumerKioskAutoLaunchStatus( |
| 66 chromeos::KioskAppManager::ConsumerKioskAutoLaunchStatus status); | 67 chromeos::KioskAppManager::ConsumerKioskAutoLaunchStatus status); |
| 67 | 68 |
| 68 KioskAppManager* kiosk_app_manager_; // not owned. | 69 KioskAppManager* kiosk_app_manager_; // not owned. |
| 69 bool initialized_; | 70 bool initialized_; |
| 70 bool is_kiosk_enabled_; | 71 bool is_kiosk_enabled_; |
| 71 bool is_auto_launch_enabled_; | 72 bool is_auto_launch_enabled_; |
| 73 OwnerSettingsServiceChromeOS* owner_settings_service_; |
| 72 base::WeakPtrFactory<KioskAppsHandler> weak_ptr_factory_; | 74 base::WeakPtrFactory<KioskAppsHandler> weak_ptr_factory_; |
| 73 | 75 |
| 74 DISALLOW_COPY_AND_ASSIGN(KioskAppsHandler); | 76 DISALLOW_COPY_AND_ASSIGN(KioskAppsHandler); |
| 75 }; | 77 }; |
| 76 | 78 |
| 77 } // namespace chromeos | 79 } // namespace chromeos |
| 78 | 80 |
| 79 #endif // CHROME_BROWSER_UI_WEBUI_EXTENSIONS_CHROMEOS_KIOSK_APPS_HANDLER_H_ | 81 #endif // CHROME_BROWSER_UI_WEBUI_EXTENSIONS_CHROMEOS_KIOSK_APPS_HANDLER_H_ |
| OLD | NEW |