| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_KIOSK_APPS_HANDLER_H_ | |
| 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_KIOSK_APPS_HANDLER_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager_observer.h" | |
| 11 #include "chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler
.h" | |
| 12 | |
| 13 namespace base { | |
| 14 class DictionaryValue; | |
| 15 class ListValue; | |
| 16 } | |
| 17 | |
| 18 namespace chromeos { | |
| 19 | |
| 20 class KioskAppManager; | |
| 21 | |
| 22 namespace options { | |
| 23 | |
| 24 class KioskAppsHandler : public CoreChromeOSOptionsHandler, | |
| 25 public KioskAppManagerObserver { | |
| 26 public: | |
| 27 KioskAppsHandler(); | |
| 28 virtual ~KioskAppsHandler(); | |
| 29 | |
| 30 // options::OptionsPageUIHandler overrides: | |
| 31 virtual void RegisterMessages() OVERRIDE; | |
| 32 virtual void GetLocalizedValues( | |
| 33 base::DictionaryValue* localized_strings) OVERRIDE; | |
| 34 | |
| 35 // KioskAppPrefsObserver overrides: | |
| 36 virtual void OnKioskAppDataChanged(const std::string& app_id) OVERRIDE; | |
| 37 virtual void OnKioskAppDataLoadFailure(const std::string& app_id) OVERRIDE; | |
| 38 | |
| 39 private: | |
| 40 // Sends all kiosk apps to webui. | |
| 41 void SendKioskApps(); | |
| 42 | |
| 43 // JS callbacks. | |
| 44 void HandleGetKioskApps(const base::ListValue* args); | |
| 45 void HandleAddKioskApp(const base::ListValue* args); | |
| 46 void HandleRemoveKioskApp(const base::ListValue* args); | |
| 47 void HandleEnableKioskAutoLaunch(const base::ListValue* args); | |
| 48 void HandleDisableKioskAutoLaunch(const base::ListValue* args); | |
| 49 | |
| 50 KioskAppManager* kiosk_app_manager_; // not owned. | |
| 51 bool initialized_; | |
| 52 | |
| 53 DISALLOW_COPY_AND_ASSIGN(KioskAppsHandler); | |
| 54 }; | |
| 55 | |
| 56 } // namespace options | |
| 57 } // namespace chromeos | |
| 58 | |
| 59 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_KIOSK_APPS_HANDLER_H_ | |
| OLD | NEW |