OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_WEBUI_LOGIN_DISPLAY_HOST_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_DISPLAY_HOST_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_DISPLAY_HOST_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_DISPLAY_HOST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "chrome/browser/chromeos/login/base_login_display_host.h" | 11 #include "chrome/browser/chromeos/login/base_login_display_host.h" |
12 | 12 |
13 namespace gfx { | 13 namespace gfx { |
14 class Rect; | 14 class Rect; |
15 } // namespace gfx | 15 } // namespace gfx |
16 | 16 |
17 namespace chromeos { | 17 namespace chromeos { |
18 | 18 |
19 class OobeUI; | 19 class OobeUI; |
| 20 class WebUILoginDisplay; |
20 class WebUILoginView; | 21 class WebUILoginView; |
21 | 22 |
22 // WebUI-specific implementation of the OOBE/login screen host. Uses | 23 // WebUI-specific implementation of the OOBE/login screen host. Uses |
23 // WebUILoginDisplay as the login screen UI implementation, | 24 // WebUILoginDisplay as the login screen UI implementation, |
24 class WebUILoginDisplayHost : public BaseLoginDisplayHost { | 25 class WebUILoginDisplayHost : public BaseLoginDisplayHost { |
25 public: | 26 public: |
26 explicit WebUILoginDisplayHost(const gfx::Rect& background_bounds); | 27 explicit WebUILoginDisplayHost(const gfx::Rect& background_bounds); |
27 virtual ~WebUILoginDisplayHost(); | 28 virtual ~WebUILoginDisplayHost(); |
28 | 29 |
29 // LoginDisplayHost implementation: | 30 // LoginDisplayHost implementation: |
30 virtual LoginDisplay* CreateLoginDisplay(LoginDisplay::Delegate* delegate) | 31 virtual LoginDisplay* CreateLoginDisplay( |
31 const OVERRIDE; | 32 LoginDisplay::Delegate* delegate) OVERRIDE; |
32 virtual gfx::NativeWindow GetNativeWindow() const OVERRIDE; | 33 virtual gfx::NativeWindow GetNativeWindow() const OVERRIDE; |
33 virtual void SetOobeProgress(BackgroundView::LoginStep step) OVERRIDE; | 34 virtual void SetOobeProgress(BackgroundView::LoginStep step) OVERRIDE; |
34 virtual void SetOobeProgressBarVisible(bool visible) OVERRIDE; | 35 virtual void SetOobeProgressBarVisible(bool visible) OVERRIDE; |
35 virtual void SetShutdownButtonEnabled(bool enable) OVERRIDE; | 36 virtual void SetShutdownButtonEnabled(bool enable) OVERRIDE; |
36 virtual void SetStatusAreaEnabled(bool enable) OVERRIDE; | 37 virtual void SetStatusAreaEnabled(bool enable) OVERRIDE; |
37 virtual void SetStatusAreaVisible(bool visible) OVERRIDE; | 38 virtual void SetStatusAreaVisible(bool visible) OVERRIDE; |
38 virtual void ShowBackground() OVERRIDE; | 39 virtual void ShowBackground() OVERRIDE; |
39 virtual void StartWizard(const std::string& first_screen_name, | 40 virtual void StartWizard(const std::string& first_screen_name, |
40 const GURL& start_url) OVERRIDE; | 41 const GURL& start_url) OVERRIDE; |
41 virtual void StartSignInScreen() OVERRIDE; | 42 virtual void StartSignInScreen() OVERRIDE; |
42 | 43 |
43 // BaseLoginDisplayHost overrides: | 44 // BaseLoginDisplayHost overrides: |
44 virtual WizardController* CreateWizardController() OVERRIDE; | 45 virtual WizardController* CreateWizardController() OVERRIDE; |
45 | 46 |
46 private: | 47 private: |
47 // Loads given URL. Creates WebUILoginView if needed. | 48 // Loads given URL. Creates WebUILoginView if needed. |
48 void LoadURL(const GURL& url); | 49 void LoadURL(const GURL& url); |
49 | 50 |
50 OobeUI* GetOobeUI() const; | 51 OobeUI* GetOobeUI() const; |
51 | 52 |
52 // Container of the screen we are displaying. | 53 // Container of the screen we are displaying. |
53 views::Widget* login_window_; | 54 views::Widget* login_window_; |
54 | 55 |
55 // Container of the view we are displaying. | 56 // Container of the view we are displaying. |
56 WebUILoginView* login_view_; | 57 WebUILoginView* login_view_; |
57 | 58 |
| 59 // Login display we are using. |
| 60 WebUILoginDisplay* webui_login_display_; |
| 61 |
58 DISALLOW_COPY_AND_ASSIGN(WebUILoginDisplayHost); | 62 DISALLOW_COPY_AND_ASSIGN(WebUILoginDisplayHost); |
59 }; | 63 }; |
60 | 64 |
61 } // namespace chromeos | 65 } // namespace chromeos |
62 | 66 |
63 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_DISPLAY_HOST_H_ | 67 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WEBUI_LOGIN_DISPLAY_HOST_H_ |
OLD | NEW |