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 | |
xiyuan
2013/08/15 18:19:42
nit: nuke one empty line.
Tim Song
2013/08/16 19:07:59
Done.
| |
16 | |
17 // A class that handles the WebUI hooks for the app launch splash screen. | |
18 class AppLaunchSplashScreenHandler : public BaseScreenHandler, | |
19 public AppLaunchSplashScreenActor { | |
20 public: | |
21 | |
xiyuan
2013/08/15 18:19:42
nit: nuke the empty line
Tim Song
2013/08/16 19:07:59
Done.
| |
22 AppLaunchSplashScreenHandler(); | |
23 virtual ~AppLaunchSplashScreenHandler(); | |
24 | |
25 // BaseScreenHandler implementation: | |
26 virtual void DeclareLocalizedValues(LocalizedValuesBuilder* builder) OVERRIDE; | |
27 virtual void Initialize() OVERRIDE; | |
28 | |
29 // WebUIMessageHandler implementation: | |
30 virtual void RegisterMessages() OVERRIDE; | |
31 | |
32 // AppLaunchSplashScreenActor implementation: | |
33 void Show(const std::string& app_id) OVERRIDE; | |
34 void ToggleNetworkConfig(bool visible) OVERRIDE; | |
35 void UpdateAppLaunchState(AppLaunchState state) OVERRIDE; | |
36 void SetDelegate(AppLaunchSplashScreenHandler::Delegate* delegate); | |
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 |