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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/kiosk_app_menu_handler.h

Issue 872633008: Migrate (Network)ErrorScreen to ScreenContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 5 years, 10 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
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_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"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" 13 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h"
14 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager_observer.h" 14 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager_observer.h"
15 #include "chrome/browser/chromeos/login/screens/network_error.h"
15 #include "chrome/browser/ui/webui/chromeos/login/network_state_informer.h" 16 #include "chrome/browser/ui/webui/chromeos/login/network_state_informer.h"
16 #include "content/public/browser/web_ui_message_handler.h" 17 #include "content/public/browser/web_ui_message_handler.h"
17 18
18 namespace chromeos { 19 namespace chromeos {
19 20
20 // KioskAppMenuHandler supplies kiosk apps data to apps menu on sign-in 21 // KioskAppMenuHandler supplies kiosk apps data to apps menu on sign-in
21 // screen when app mode is enabled and handles "launchKioskApp" request 22 // screen when app mode is enabled and handles "launchKioskApp" request
22 // from the apps menu. 23 // from the apps menu.
23 class KioskAppMenuHandler 24 class KioskAppMenuHandler
24 : public content::WebUIMessageHandler, 25 : public content::WebUIMessageHandler,
(...skipping 19 matching lines...) Expand all
44 // JS callbacks. 45 // JS callbacks.
45 void HandleInitializeKioskApps(const base::ListValue* args); 46 void HandleInitializeKioskApps(const base::ListValue* args);
46 void HandleKioskAppsLoaded(const base::ListValue* args); 47 void HandleKioskAppsLoaded(const base::ListValue* args);
47 void HandleCheckKioskAppLaunchError(const base::ListValue* args); 48 void HandleCheckKioskAppLaunchError(const base::ListValue* args);
48 49
49 // KioskAppManagerObserver overrides: 50 // KioskAppManagerObserver overrides:
50 void OnKioskAppsSettingsChanged() override; 51 void OnKioskAppsSettingsChanged() override;
51 void OnKioskAppDataChanged(const std::string& app_id) override; 52 void OnKioskAppDataChanged(const std::string& app_id) override;
52 53
53 // NetworkStateInformer::NetworkStateInformerObserver overrides: 54 // NetworkStateInformer::NetworkStateInformerObserver overrides:
54 void UpdateState(ErrorScreenActor::ErrorReason reason) override; 55 void UpdateState(NetworkError::ErrorReason reason) override;
55 56
56 // True when WebUI is initialized. Otherwise don't allow calling JS functions. 57 // True when WebUI is initialized. Otherwise don't allow calling JS functions.
57 bool is_webui_initialized_; 58 bool is_webui_initialized_;
58 59
59 scoped_refptr<NetworkStateInformer> network_state_informer_; 60 scoped_refptr<NetworkStateInformer> network_state_informer_;
60 61
61 base::WeakPtrFactory<KioskAppMenuHandler> weak_ptr_factory_; 62 base::WeakPtrFactory<KioskAppMenuHandler> weak_ptr_factory_;
62 63
63 DISALLOW_COPY_AND_ASSIGN(KioskAppMenuHandler); 64 DISALLOW_COPY_AND_ASSIGN(KioskAppMenuHandler);
64 }; 65 };
65 66
66 } // namespace chromeos 67 } // namespace chromeos
67 68
68 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_KIOSK_APP_MENU_HANDLER_H_ 69 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_KIOSK_APP_MENU_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698