app_launch_splash_screen_actor.h revision 1e9bf3e0803691d0a228da41fc608347b6db4340
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_CHROMEOS_LOGIN_SCREENS_APP_LAUNCH_SPLASH_SCREEN_ACTOR_H_
6#define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_APP_LAUNCH_SPLASH_SCREEN_ACTOR_H_
7
8#include "base/strings/string16.h"
9
10namespace chromeos {
11
12// Interface for UI implemenations of the ApplaunchSplashScreen.
13class AppLaunchSplashScreenActor {
14 public:
15  enum AppLaunchState {
16    APP_LAUNCH_STATE_LOADING_AUTH_FILE,
17    APP_LAUNCH_STATE_LOADING_TOKEN_SERVICE,
18    APP_LAUNCH_STATE_PREPARING_NETWORK,
19    APP_LAUNCH_STATE_INSTALLING_APPLICATION,
20    APP_LAUNCH_STATE_WAITING_APP_WINDOW,
21  };
22
23  class Delegate {
24   public:
25    virtual void OnConfigureNetwork() = 0;
26    virtual void OnCancelAppLaunch() = 0;
27
28   protected:
29    virtual ~Delegate() {}
30  };
31
32  virtual ~AppLaunchSplashScreenActor() {}
33
34  // Sets screen this actor belongs to.
35  virtual void SetDelegate(Delegate* screen) = 0;
36
37  // Prepare the contents to showing.
38  virtual void PrepareToShow() = 0;
39
40  // Shows the contents of the screen.
41  virtual void Show(const std::string& app_id) = 0;
42
43  // Hides the contents of the screen.
44  virtual void Hide() = 0;
45
46  // Set the current app launch state.
47  virtual void UpdateAppLaunchState(AppLaunchState state) = 0;
48
49  // Sets whether continue control is enabled.
50  virtual void ToggleNetworkConfig(bool visible) = 0;
51};
52
53}  // namespace chromeos
54
55#endif  // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_APP_LAUNCH_SPLASH_SCREEN_ACTOR_H_
56