| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_LOGIN_DISPLAY_HOST_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_DISPLAY_HOST_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_DISPLAY_HOST_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_DISPLAY_HOST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/values.h" | 11 #include "base/values.h" |
| 11 #include "chrome/browser/chromeos/customization_document.h" | 12 #include "chrome/browser/chromeos/customization_document.h" |
| 12 #include "chrome/browser/chromeos/login/login_display.h" | 13 #include "chrome/browser/chromeos/login/login_display.h" |
| 13 #include "ui/gfx/native_widget_types.h" | 14 #include "ui/gfx/native_widget_types.h" |
| 14 | 15 |
| 15 namespace views { | 16 namespace views { |
| 16 class Widget; | 17 class Widget; |
| 17 } // namespace views | 18 } // namespace views |
| 18 | 19 |
| 19 namespace chromeos { | 20 namespace chromeos { |
| 20 | 21 |
| 22 class WebUILoginView; |
| 21 class WizardController; | 23 class WizardController; |
| 22 | 24 |
| 23 // An interface that defines OOBE/login screen host. | 25 // An interface that defines OOBE/login screen host. |
| 24 // Host encapsulates WebUI window OOBE/login controllers, | 26 // Host encapsulates WebUI window OOBE/login controllers, |
| 25 // UI implementation (such as LoginDisplay). | 27 // UI implementation (such as LoginDisplay). |
| 26 class LoginDisplayHost { | 28 class LoginDisplayHost { |
| 27 public: | 29 public: |
| 28 virtual ~LoginDisplayHost() {} | 30 virtual ~LoginDisplayHost() {} |
| 29 | 31 |
| 30 // Creates UI implementation specific login display instance (views/WebUI). | 32 // Creates UI implementation specific login display instance (views/WebUI). |
| 31 // The caller takes ownership of the returned value. | 33 // The caller takes ownership of the returned value. |
| 32 virtual LoginDisplay* CreateLoginDisplay( | 34 virtual LoginDisplay* CreateLoginDisplay( |
| 33 LoginDisplay::Delegate* delegate) = 0; | 35 LoginDisplay::Delegate* delegate) = 0; |
| 34 | 36 |
| 35 // Returns corresponding native window. | 37 // Returns corresponding native window. |
| 36 virtual gfx::NativeWindow GetNativeWindow() const = 0; | 38 virtual gfx::NativeWindow GetNativeWindow() const = 0; |
| 37 | 39 |
| 40 // Returns the current login view. |
| 41 virtual WebUILoginView* GetWebUILoginView() const = 0; |
| 42 |
| 38 // Returns corresponding widget. | 43 // Returns corresponding widget. |
| 39 virtual views::Widget* GetWidget() const = 0; | 44 virtual views::Widget* GetWidget() const = 0; |
| 40 | 45 |
| 41 // Called when browsing session starts before creating initial browser. | 46 // Called when browsing session starts before creating initial browser. |
| 42 virtual void BeforeSessionStart() = 0; | 47 virtual void BeforeSessionStart() = 0; |
| 43 | 48 |
| 44 // Called when browsing session starts so | 49 // Called when browsing session starts so |
| 45 // LoginDisplayHost instance may delete itself. | 50 // LoginDisplayHost instance may delete itself. |
| 46 virtual void OnSessionStart() = 0; | 51 virtual void OnSessionStart() = 0; |
| 47 | 52 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 63 // Signals the LoginDisplayHost that it can proceed with the Enterprise | 68 // Signals the LoginDisplayHost that it can proceed with the Enterprise |
| 64 // Auto-Enrollment checks now. | 69 // Auto-Enrollment checks now. |
| 65 virtual void CheckForAutoEnrollment() = 0; | 70 virtual void CheckForAutoEnrollment() = 0; |
| 66 | 71 |
| 67 // Starts out-of-box-experience flow or shows other screen handled by | 72 // Starts out-of-box-experience flow or shows other screen handled by |
| 68 // Wizard controller i.e. camera, recovery. | 73 // Wizard controller i.e. camera, recovery. |
| 69 // One could specify start screen with |first_screen_name|. | 74 // One could specify start screen with |first_screen_name|. |
| 70 // Takes ownership of |screen_parameters|, which can also be NULL. | 75 // Takes ownership of |screen_parameters|, which can also be NULL. |
| 71 virtual void StartWizard( | 76 virtual void StartWizard( |
| 72 const std::string& first_screen_name, | 77 const std::string& first_screen_name, |
| 73 DictionaryValue* screen_parameters) = 0; | 78 scoped_ptr<DictionaryValue> screen_parameters) = 0; |
| 74 | 79 |
| 75 // Returns current WizardController, if it exists. | 80 // Returns current WizardController, if it exists. |
| 76 // Result should not be stored. | 81 // Result should not be stored. |
| 77 virtual WizardController* GetWizardController() = 0; | 82 virtual WizardController* GetWizardController() = 0; |
| 78 | 83 |
| 79 // Starts sign in screen. | 84 // Starts sign in screen. |
| 80 virtual void StartSignInScreen() = 0; | 85 virtual void StartSignInScreen() = 0; |
| 81 | 86 |
| 82 // Resumes a previously started sign in screen. | 87 // Resumes a previously started sign in screen. |
| 83 virtual void ResumeSignInScreen() = 0; | 88 virtual void ResumeSignInScreen() = 0; |
| 84 | 89 |
| 85 // Invoked when system preferences that affect the signin screen have changed. | 90 // Invoked when system preferences that affect the signin screen have changed. |
| 86 virtual void OnPreferencesChanged() = 0; | 91 virtual void OnPreferencesChanged() = 0; |
| 87 }; | 92 }; |
| 88 | 93 |
| 89 } // namespace chromeos | 94 } // namespace chromeos |
| 90 | 95 |
| 91 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_DISPLAY_HOST_H_ | 96 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_DISPLAY_HOST_H_ |
| OLD | NEW |