Elim cr-checkbox
[chromium-blink-merge.git] / chrome / browser / chromeos / login / ui / login_display_host.h
blobd0f06bf6c747a0e194de9ceeef05ff8aff776ace
1 // Copyright 2014 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_CHROMEOS_LOGIN_UI_LOGIN_DISPLAY_HOST_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOGIN_DISPLAY_HOST_H_
8 #include <string>
10 #include "base/callback.h"
11 #include "base/callback_list.h"
12 #include "chrome/browser/chromeos/customization/customization_document.h"
13 #include "chrome/browser/chromeos/login/ui/login_display.h"
14 #include "ui/gfx/native_widget_types.h"
16 namespace views {
17 class Widget;
18 } // namespace views
20 namespace chromeos {
22 class AppLaunchController;
23 class AutoEnrollmentController;
24 class LoginScreenContext;
25 class WebUILoginView;
26 class WizardController;
28 // An interface that defines OOBE/login screen host.
29 // Host encapsulates WebUI window OOBE/login controllers,
30 // UI implementation (such as LoginDisplay).
31 class LoginDisplayHost {
32 public:
33 virtual ~LoginDisplayHost() {}
35 // Creates UI implementation specific login display instance (views/WebUI).
36 // The caller takes ownership of the returned value.
37 virtual LoginDisplay* CreateLoginDisplay(
38 LoginDisplay::Delegate* delegate) = 0;
40 // Returns corresponding native window.
41 virtual gfx::NativeWindow GetNativeWindow() const = 0;
43 // Returns the current login view.
44 virtual WebUILoginView* GetWebUILoginView() const = 0;
46 // Called when browsing session starts before creating initial browser.
47 virtual void BeforeSessionStart() = 0;
49 // Called when user enters or returns to browsing session so
50 // LoginDisplayHost instance may delete itself.
51 virtual void Finalize() = 0;
53 // Called when a login has completed successfully.
54 virtual void OnCompleteLogin() = 0;
56 // Open proxy settings dialog.
57 virtual void OpenProxySettings() = 0;
59 // Toggles status area visibility.
60 virtual void SetStatusAreaVisible(bool visible) = 0;
62 // Gets the auto-enrollment client.
63 virtual AutoEnrollmentController* GetAutoEnrollmentController() = 0;
65 // Starts out-of-box-experience flow or shows other screen handled by
66 // Wizard controller i.e. camera, recovery.
67 // One could specify start screen with |first_screen_name|.
68 virtual void StartWizard(const std::string& first_screen_name) = 0;
70 // Returns current WizardController, if it exists.
71 // Result should not be stored.
72 virtual WizardController* GetWizardController() = 0;
74 // Returns current AppLaunchController, if it exists.
75 // Result should not be stored.
76 virtual AppLaunchController* GetAppLaunchController() = 0;
78 // Starts screen for adding user into session.
79 // |completion_callback| called before display host shutdown.
80 // |completion_callback| can be null.
81 virtual void StartUserAdding(const base::Closure& completion_callback) = 0;
83 // Starts sign in screen.
84 virtual void StartSignInScreen(const LoginScreenContext& context) = 0;
86 // Invoked when system preferences that affect the signin screen have changed.
87 virtual void OnPreferencesChanged() = 0;
89 // Initiates authentication network prewarming.
90 virtual void PrewarmAuthentication() = 0;
92 // Starts app launch splash screen. If |is_auto_launch| is true, the app is
93 // being auto-launched with no delay.
94 virtual void StartAppLaunch(const std::string& app_id,
95 bool diagnostic_mode,
96 bool is_auto_launch) = 0;
98 // Starts the demo app launch.
99 virtual void StartDemoAppLaunch() = 0;
102 } // namespace chromeos
104 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOGIN_DISPLAY_HOST_H_