Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(311)

Side by Side Diff: chrome/browser/ui/webui/extensions/chromeos/kiosk_apps_handler.h

Issue 300843013: Install and launch kiosk app from cached crx file at start up. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address code review comments. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
(...skipping 19 matching lines...) Expand all
30 public KioskAppManagerObserver { 30 public KioskAppManagerObserver {
31 public: 31 public:
32 KioskAppsHandler(); 32 KioskAppsHandler();
33 virtual ~KioskAppsHandler(); 33 virtual ~KioskAppsHandler();
34 34
35 void GetLocalizedValues(content::WebUIDataSource* source); 35 void GetLocalizedValues(content::WebUIDataSource* source);
36 36
37 // content::WebUIMessageHandler overrides: 37 // content::WebUIMessageHandler overrides:
38 virtual void RegisterMessages() OVERRIDE; 38 virtual void RegisterMessages() OVERRIDE;
39 39
40 // KioskAppPrefsObserver overrides: 40 // KioskAppManagerObserver overrides:
41 virtual void OnKioskAppDataChanged(const std::string& app_id) OVERRIDE; 41 virtual void OnKioskAppDataChanged(const std::string& app_id) OVERRIDE;
42 virtual void OnKioskAppDataLoadFailure(const std::string& app_id) OVERRIDE; 42 virtual void OnKioskAppDataLoadFailure(const std::string& app_id) OVERRIDE;
43 virtual void OnKioskExtensionLoadedInCache(
44 const std::string& app_id) OVERRIDE;
45 virtual void OnKioskExtensionDownloadFailed(
46 const std::string& app_id) OVERRIDE;
47
43 virtual void OnKioskAppsSettingsChanged() OVERRIDE; 48 virtual void OnKioskAppsSettingsChanged() OVERRIDE;
44 49
45 private: 50 private:
46 // Sends all kiosk apps and settings to webui. 51 // Sends all kiosk apps and settings to webui.
47 void SendKioskAppSettings(); 52 void SendKioskAppSettings();
48 53
49 // JS callbacks. 54 // JS callbacks.
50 void HandleInitializeKioskAppSettings(const base::ListValue* args); 55 void HandleInitializeKioskAppSettings(const base::ListValue* args);
51 void HandleGetKioskAppSettings(const base::ListValue* args); 56 void HandleGetKioskAppSettings(const base::ListValue* args);
52 void HandleAddKioskApp(const base::ListValue* args); 57 void HandleAddKioskApp(const base::ListValue* args);
53 void HandleRemoveKioskApp(const base::ListValue* args); 58 void HandleRemoveKioskApp(const base::ListValue* args);
54 void HandleEnableKioskAutoLaunch(const base::ListValue* args); 59 void HandleEnableKioskAutoLaunch(const base::ListValue* args);
55 void HandleDisableKioskAutoLaunch(const base::ListValue* args); 60 void HandleDisableKioskAutoLaunch(const base::ListValue* args);
56 void HandleSetDisableBailoutShortcut(const base::ListValue* args); 61 void HandleSetDisableBailoutShortcut(const base::ListValue* args);
57 62
63 void HandleKioskDataChange(const std::string& app_id);
64 void HandleKioskDataFailure(const std::string& app_id);
xiyuan 2014/07/15 02:32:51 nit: Handlexxx sounds like a JS callback. Let's us
jennyz 2014/07/15 16:36:41 Done.
65
58 // Callback for KioskAppManager::GetConsumerKioskModeStatus(). 66 // Callback for KioskAppManager::GetConsumerKioskModeStatus().
59 void OnGetConsumerKioskAutoLaunchStatus( 67 void OnGetConsumerKioskAutoLaunchStatus(
60 chromeos::KioskAppManager::ConsumerKioskAutoLaunchStatus status); 68 chromeos::KioskAppManager::ConsumerKioskAutoLaunchStatus status);
61 69
62 KioskAppManager* kiosk_app_manager_; // not owned. 70 KioskAppManager* kiosk_app_manager_; // not owned.
63 bool initialized_; 71 bool initialized_;
64 bool is_kiosk_enabled_; 72 bool is_kiosk_enabled_;
65 bool is_auto_launch_enabled_; 73 bool is_auto_launch_enabled_;
66 base::WeakPtrFactory<KioskAppsHandler> weak_ptr_factory_; 74 base::WeakPtrFactory<KioskAppsHandler> weak_ptr_factory_;
67 75
68 DISALLOW_COPY_AND_ASSIGN(KioskAppsHandler); 76 DISALLOW_COPY_AND_ASSIGN(KioskAppsHandler);
69 }; 77 };
70 78
71 } // namespace chromeos 79 } // namespace chromeos
72 80
73 #endif // CHROME_BROWSER_UI_WEBUI_EXTENSIONS_CHROMEOS_KIOSK_APPS_HANDLER_H_ 81 #endif // CHROME_BROWSER_UI_WEBUI_EXTENSIONS_CHROMEOS_KIOSK_APPS_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698