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.
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_
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"
16 // A class that handles the WebUI hooks for the app launch splash screen.
17 class AppLaunchSplashScreenHandler : public BaseScreenHandler,
18 public AppLaunchSplashScreenActor {
20 AppLaunchSplashScreenHandler();
21 virtual ~AppLaunchSplashScreenHandler();
23 // BaseScreenHandler implementation:
24 virtual void DeclareLocalizedValues(LocalizedValuesBuilder* builder) OVERRIDE;
25 virtual void Initialize() OVERRIDE;
27 // WebUIMessageHandler implementation:
28 virtual void RegisterMessages() OVERRIDE;
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(
37 AppLaunchSplashScreenHandler::Delegate* delegate) OVERRIDE;
40 void PopulateAppInfo(base::DictionaryValue* out_info);
41 void SetLaunchText(const std::string& text);
42 int GetProgressMessageFromState(AppLaunchState state);
43 void HandleConfigureNetwork();
44 void HandleCancelAppLaunch();
46 AppLaunchSplashScreenHandler::Delegate* delegate_;
49 AppLaunchState state_;
51 DISALLOW_COPY_AND_ASSIGN(AppLaunchSplashScreenHandler);
54 } // namespace chromeos
56 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_APP_LAUNCH_SPLASH_SCREEN_HANDLER_H_