| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOGIN_DISPLAY_HOST_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOGIN_DISPLAY_HOST_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOGIN_DISPLAY_HOST_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOGIN_DISPLAY_HOST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/callback_list.h" | 11 #include "base/callback_list.h" |
| 12 #include "chrome/browser/chromeos/customization/customization_document.h" | 12 #include "chrome/browser/chromeos/customization/customization_document.h" |
| 13 #include "chrome/browser/chromeos/login/ui/login_display.h" | 13 #include "chrome/browser/chromeos/login/ui/login_display.h" |
| 14 #include "ui/gfx/native_widget_types.h" | 14 #include "ui/gfx/native_widget_types.h" |
| 15 | 15 |
| 16 namespace views { | 16 namespace views { |
| 17 class Widget; | 17 class Widget; |
| 18 } // namespace views | 18 } // namespace views |
| 19 | 19 |
| 20 namespace chromeos { | 20 namespace chromeos { |
| 21 | 21 |
| 22 class AppLaunchController; | 22 class AppLaunchController; |
| 23 class AutoEnrollmentController; | 23 class AutoEnrollmentController; |
| 24 class LoginScreenContext; | 24 class LoginScreenContext; |
| 25 class OobeUI; |
| 25 class WebUILoginView; | 26 class WebUILoginView; |
| 26 class WizardController; | 27 class WizardController; |
| 27 | 28 |
| 28 // An interface that defines OOBE/login screen host. | 29 // An interface that defines OOBE/login screen host. |
| 29 // Host encapsulates WebUI window OOBE/login controllers, | 30 // Host encapsulates WebUI window OOBE/login controllers, |
| 30 // UI implementation (such as LoginDisplay). | 31 // UI implementation (such as LoginDisplay). |
| 31 class LoginDisplayHost { | 32 class LoginDisplayHost { |
| 32 public: | 33 public: |
| 34 // Returns the default LoginDisplayHost instance if it has been created. |
| 35 static LoginDisplayHost* default_host() { return default_host_; } |
| 36 |
| 33 virtual ~LoginDisplayHost() {} | 37 virtual ~LoginDisplayHost() {} |
| 34 | 38 |
| 35 // Creates UI implementation specific login display instance (views/WebUI). | 39 // Creates UI implementation specific login display instance (views/WebUI). |
| 36 // The caller takes ownership of the returned value. | 40 // The caller takes ownership of the returned value. |
| 37 virtual LoginDisplay* CreateLoginDisplay( | 41 virtual LoginDisplay* CreateLoginDisplay( |
| 38 LoginDisplay::Delegate* delegate) = 0; | 42 LoginDisplay::Delegate* delegate) = 0; |
| 39 | 43 |
| 40 // Returns corresponding native window. | 44 // Returns corresponding native window. |
| 41 virtual gfx::NativeWindow GetNativeWindow() const = 0; | 45 virtual gfx::NativeWindow GetNativeWindow() const = 0; |
| 42 | 46 |
| 47 // Returns instance of the OOBE WebUI. |
| 48 virtual OobeUI* GetOobeUI() const = 0; |
| 49 |
| 43 // Returns the current login view. | 50 // Returns the current login view. |
| 44 virtual WebUILoginView* GetWebUILoginView() const = 0; | 51 virtual WebUILoginView* GetWebUILoginView() const = 0; |
| 45 | 52 |
| 46 // Called when browsing session starts before creating initial browser. | 53 // Called when browsing session starts before creating initial browser. |
| 47 virtual void BeforeSessionStart() = 0; | 54 virtual void BeforeSessionStart() = 0; |
| 48 | 55 |
| 49 // Called when user enters or returns to browsing session so | 56 // Called when user enters or returns to browsing session so |
| 50 // LoginDisplayHost instance may delete itself. | 57 // LoginDisplayHost instance may delete itself. |
| 51 virtual void Finalize() = 0; | 58 virtual void Finalize() = 0; |
| 52 | 59 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 virtual void PrewarmAuthentication() = 0; | 97 virtual void PrewarmAuthentication() = 0; |
| 91 | 98 |
| 92 // Starts app launch splash screen. If |is_auto_launch| is true, the app is | 99 // Starts app launch splash screen. If |is_auto_launch| is true, the app is |
| 93 // being auto-launched with no delay. | 100 // being auto-launched with no delay. |
| 94 virtual void StartAppLaunch(const std::string& app_id, | 101 virtual void StartAppLaunch(const std::string& app_id, |
| 95 bool diagnostic_mode, | 102 bool diagnostic_mode, |
| 96 bool is_auto_launch) = 0; | 103 bool is_auto_launch) = 0; |
| 97 | 104 |
| 98 // Starts the demo app launch. | 105 // Starts the demo app launch. |
| 99 virtual void StartDemoAppLaunch() = 0; | 106 virtual void StartDemoAppLaunch() = 0; |
| 107 |
| 108 protected: |
| 109 // Default LoginDisplayHost. Child class sets the reference. |
| 110 static LoginDisplayHost* default_host_; |
| 100 }; | 111 }; |
| 101 | 112 |
| 102 } // namespace chromeos | 113 } // namespace chromeos |
| 103 | 114 |
| 104 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOGIN_DISPLAY_HOST_H_ | 115 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOGIN_DISPLAY_HOST_H_ |
| OLD | NEW |