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_IMPL_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOGIN_DISPLAY_HOST_IMPL_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOGIN_DISPLAY_HOST_IMPL_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOGIN_DISPLAY_HOST_IMPL_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 | 44 |
45 namespace chromeos { | 45 namespace chromeos { |
46 | 46 |
47 class DemoAppLauncher; | 47 class DemoAppLauncher; |
48 class FocusRingController; | 48 class FocusRingController; |
49 class KeyboardDrivenOobeKeyHandler; | 49 class KeyboardDrivenOobeKeyHandler; |
50 class WebUILoginDisplay; | 50 class WebUILoginDisplay; |
51 class WebUILoginView; | 51 class WebUILoginView; |
52 | 52 |
53 // An implementation class for OOBE/login WebUI screen host. | 53 // An implementation class for OOBE/login WebUI screen host. |
54 // It encapsulates controllers, background integration and flow. | 54 // It encapsulates controllers, wallpaper integration and flow. |
55 class LoginDisplayHostImpl : public LoginDisplayHost, | 55 class LoginDisplayHostImpl : public LoginDisplayHost, |
56 public content::NotificationObserver, | 56 public content::NotificationObserver, |
57 public content::WebContentsObserver, | 57 public content::WebContentsObserver, |
58 public chromeos::SessionManagerClient::Observer, | 58 public chromeos::SessionManagerClient::Observer, |
59 public chromeos::CrasAudioHandler::AudioObserver, | 59 public chromeos::CrasAudioHandler::AudioObserver, |
60 public ash::ShellObserver, | 60 public ash::ShellObserver, |
61 public keyboard::KeyboardControllerObserver, | 61 public keyboard::KeyboardControllerObserver, |
62 public display::DisplayObserver, | 62 public display::DisplayObserver, |
63 public views::WidgetRemovalsObserver, | 63 public views::WidgetRemovalsObserver, |
64 public chrome::MultiUserWindowManager::Observer { | 64 public chrome::MultiUserWindowManager::Observer { |
65 public: | 65 public: |
66 explicit LoginDisplayHostImpl(const gfx::Rect& background_bounds); | 66 explicit LoginDisplayHostImpl(const gfx::Rect& wallpaper_bounds); |
67 ~LoginDisplayHostImpl() override; | 67 ~LoginDisplayHostImpl() override; |
68 | 68 |
69 // LoginDisplayHost implementation: | 69 // LoginDisplayHost implementation: |
70 LoginDisplay* CreateLoginDisplay(LoginDisplay::Delegate* delegate) override; | 70 LoginDisplay* CreateLoginDisplay(LoginDisplay::Delegate* delegate) override; |
71 gfx::NativeWindow GetNativeWindow() const override; | 71 gfx::NativeWindow GetNativeWindow() const override; |
72 OobeUI* GetOobeUI() const override; | 72 OobeUI* GetOobeUI() const override; |
73 WebUILoginView* GetWebUILoginView() const override; | 73 WebUILoginView* GetWebUILoginView() const override; |
74 void BeforeSessionStart() override; | 74 void BeforeSessionStart() override; |
75 void Finalize() override; | 75 void Finalize() override; |
76 void OnCompleteLogin() override; | 76 void OnCompleteLogin() override; |
(...skipping 13 matching lines...) Expand all Loading... |
90 bool diagnostic_mode, | 90 bool diagnostic_mode, |
91 bool auto_launch) override; | 91 bool auto_launch) override; |
92 void StartDemoAppLaunch() override; | 92 void StartDemoAppLaunch() override; |
93 | 93 |
94 // Creates WizardController instance. | 94 // Creates WizardController instance. |
95 WizardController* CreateWizardController(); | 95 WizardController* CreateWizardController(); |
96 | 96 |
97 // Called when the first browser window is created, but before it's shown. | 97 // Called when the first browser window is created, but before it's shown. |
98 void OnBrowserCreated(); | 98 void OnBrowserCreated(); |
99 | 99 |
100 const gfx::Rect& background_bounds() const { return background_bounds_; } | 100 const gfx::Rect& wallpaper_bounds() const { return wallpaper_bounds_; } |
101 | 101 |
102 // Trace id for ShowLoginWebUI event (since there exists at most one login | 102 // Trace id for ShowLoginWebUI event (since there exists at most one login |
103 // WebUI at a time). | 103 // WebUI at a time). |
104 static const int kShowLoginWebUIid; | 104 static const int kShowLoginWebUIid; |
105 | 105 |
106 views::Widget* login_window_for_test() { return login_window_; } | 106 views::Widget* login_window_for_test() { return login_window_; } |
107 | 107 |
108 // Disable GaiaScreenHandler restrictive proxy check. | 108 // Disable GaiaScreenHandler restrictive proxy check. |
109 static void DisableRestrictiveProxyCheckForTest(); | 109 static void DisableRestrictiveProxyCheckForTest(); |
110 | 110 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 void SetOobeProgressBarVisible(bool visible); | 193 void SetOobeProgressBarVisible(bool visible); |
194 | 194 |
195 // Tries to play startup sound. If sound can't be played right now, | 195 // Tries to play startup sound. If sound can't be played right now, |
196 // for instance, because cras server is not initialized, playback | 196 // for instance, because cras server is not initialized, playback |
197 // will be delayed. | 197 // will be delayed. |
198 void TryToPlayStartupSound(); | 198 void TryToPlayStartupSound(); |
199 | 199 |
200 // Called when login-prompt-visible signal is caught. | 200 // Called when login-prompt-visible signal is caught. |
201 void OnLoginPromptVisible(); | 201 void OnLoginPromptVisible(); |
202 | 202 |
203 // Used to calculate position of the screens and background. | 203 // Used to calculate position of the screens and wallpaper. |
204 gfx::Rect background_bounds_; | 204 gfx::Rect wallpaper_bounds_; |
205 | 205 |
206 content::NotificationRegistrar registrar_; | 206 content::NotificationRegistrar registrar_; |
207 | 207 |
208 // The controller driving the auto-enrollment check. | 208 // The controller driving the auto-enrollment check. |
209 std::unique_ptr<AutoEnrollmentController> auto_enrollment_controller_; | 209 std::unique_ptr<AutoEnrollmentController> auto_enrollment_controller_; |
210 | 210 |
211 // Sign in screen controller. | 211 // Sign in screen controller. |
212 std::unique_ptr<ExistingUserController> existing_user_controller_; | 212 std::unique_ptr<ExistingUserController> existing_user_controller_; |
213 | 213 |
214 // OOBE and some screens (camera, recovery) controller. | 214 // OOBE and some screens (camera, recovery) controller. |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 | 318 |
319 base::WeakPtrFactory<LoginDisplayHostImpl> pointer_factory_; | 319 base::WeakPtrFactory<LoginDisplayHostImpl> pointer_factory_; |
320 base::WeakPtrFactory<LoginDisplayHostImpl> animation_weak_ptr_factory_; | 320 base::WeakPtrFactory<LoginDisplayHostImpl> animation_weak_ptr_factory_; |
321 | 321 |
322 DISALLOW_COPY_AND_ASSIGN(LoginDisplayHostImpl); | 322 DISALLOW_COPY_AND_ASSIGN(LoginDisplayHostImpl); |
323 }; | 323 }; |
324 | 324 |
325 } // namespace chromeos | 325 } // namespace chromeos |
326 | 326 |
327 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOGIN_DISPLAY_HOST_IMPL_H_ | 327 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOGIN_DISPLAY_HOST_IMPL_H_ |
OLD | NEW |