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_CHROMEOS_LOGIN_APP_LAUNCH_SPLASH_SCREEN_HANDLER_ H_ | |
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_APP_LAUNCH_SPLASH_SCREEN_HANDLER_ H_ | |
7 | |
8 #include <set> | |
9 #include <string> | |
10 | |
11 #include "chrome/browser/chromeos/login/screens/app_launch_splash_screen_actor.h " | |
12 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" | |
13 | |
14 namespace chromeos { | |
15 | |
16 // A class that handles the WebUI hooks for the app launch splash screen. | |
17 class AppLaunchSplashScreenHandler : public BaseScreenHandler, | |
18 public AppLaunchSplashScreenActor { | |
19 public: | |
20 AppLaunchSplashScreenHandler(); | |
21 virtual ~AppLaunchSplashScreenHandler(); | |
22 | |
23 // BaseScreenHandler implementation: | |
24 virtual void DeclareLocalizedValues(LocalizedValuesBuilder* builder) OVERRIDE; | |
25 virtual void Initialize() OVERRIDE; | |
26 | |
27 // WebUIMessageHandler implementation: | |
28 virtual void RegisterMessages() OVERRIDE; | |
29 | |
30 // AppLaunchSplashScreenActor implementation: | |
31 virtual void Show(const std::string& app_id) OVERRIDE; | |
32 virtual void PrepareToShow() OVERRIDE; | |
33 virtual void Hide() OVERRIDE; | |
34 virtual void ToggleNetworkConfig(bool visible) OVERRIDE; | |
35 virtual void UpdateAppLaunchState(AppLaunchState state) OVERRIDE; | |
36 virtual void SetDelegate(AppLaunchSplashScreenHandler::Delegate* delegate) OVE RRIDE; | |
xiyuan
2013/08/19 17:40:29
nit: wrap at 80 char col. In this case, we might n
Tim Song
2013/08/19 20:05:07
Done.
| |
37 | |
38 private: | |
39 void PopulateAppInfo(base::DictionaryValue* out_info); | |
40 void SetLaunchText(const std::string& text); | |
41 int GetProgressMessageFromState(AppLaunchState state); | |
42 void HandleConfigureNetwork(); | |
43 void HandleCancelAppLaunch(); | |
44 | |
45 AppLaunchSplashScreenHandler::Delegate* delegate_; | |
46 bool show_on_init_; | |
47 std::string app_id_; | |
48 AppLaunchState state_; | |
49 | |
50 DISALLOW_COPY_AND_ASSIGN(AppLaunchSplashScreenHandler); | |
51 }; | |
52 | |
53 } // namespace chromeos | |
54 | |
55 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_APP_LAUNCH_SPLASH_SCREEN_HANDL ER_H_ | |
OLD | NEW |