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 <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "ash/shell_delegate.h" | |
12 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
13 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
14 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
15 #include "chrome/browser/chromeos/login/app_launch_controller.h" | 14 #include "chrome/browser/chromeos/login/app_launch_controller.h" |
16 #include "chrome/browser/chromeos/login/auth/auth_prewarmer.h" | 15 #include "chrome/browser/chromeos/login/auth/auth_prewarmer.h" |
17 #include "chrome/browser/chromeos/login/existing_user_controller.h" | 16 #include "chrome/browser/chromeos/login/existing_user_controller.h" |
18 #include "chrome/browser/chromeos/login/ui/login_display.h" | 17 #include "chrome/browser/chromeos/login/ui/login_display.h" |
19 #include "chrome/browser/chromeos/login/ui/login_display_host.h" | 18 #include "chrome/browser/chromeos/login/ui/login_display_host.h" |
20 #include "chrome/browser/chromeos/login/wizard_controller.h" | 19 #include "chrome/browser/chromeos/login/wizard_controller.h" |
21 #include "chrome/browser/chromeos/settings/device_settings_service.h" | 20 #include "chrome/browser/chromeos/settings/device_settings_service.h" |
22 #include "chromeos/audio/cras_audio_handler.h" | 21 #include "chromeos/audio/cras_audio_handler.h" |
23 #include "chromeos/dbus/session_manager_client.h" | 22 #include "chromeos/dbus/session_manager_client.h" |
24 #include "content/public/browser/notification_observer.h" | 23 #include "content/public/browser/notification_observer.h" |
25 #include "content/public/browser/notification_registrar.h" | 24 #include "content/public/browser/notification_registrar.h" |
26 #include "content/public/browser/web_contents_observer.h" | 25 #include "content/public/browser/web_contents_observer.h" |
27 #include "ui/gfx/display_observer.h" | 26 #include "ui/gfx/display_observer.h" |
28 #include "ui/gfx/rect.h" | 27 #include "ui/gfx/rect.h" |
29 #include "ui/keyboard/keyboard_controller_observer.h" | 28 #include "ui/keyboard/keyboard_controller_observer.h" |
30 #include "ui/views/widget/widget_removals_observer.h" | 29 #include "ui/views/widget/widget_removals_observer.h" |
31 | 30 |
| 31 #if !defined(USE_ATHENA) |
| 32 #include "ash/shell_delegate.h" |
| 33 #endif |
| 34 |
32 class PrefService; | 35 class PrefService; |
33 | 36 |
34 namespace content { | 37 namespace content { |
35 class RenderFrameHost; | 38 class RenderFrameHost; |
36 class WebContents; | 39 class WebContents; |
37 } | 40 } |
38 | 41 |
39 namespace chromeos { | 42 namespace chromeos { |
40 | 43 |
41 class DemoAppLauncher; | 44 class DemoAppLauncher; |
42 class FocusRingController; | 45 class FocusRingController; |
43 class KeyboardDrivenOobeKeyHandler; | |
44 class OobeUI; | 46 class OobeUI; |
45 class WebUILoginDisplay; | 47 class WebUILoginDisplay; |
46 class WebUILoginView; | 48 class WebUILoginView; |
47 | 49 |
| 50 #if !defined(USE_ATHENA) |
| 51 class KeyboardDrivenOobeKeyHandler; |
| 52 #endif |
| 53 |
48 // An implementation class for OOBE/login WebUI screen host. | 54 // An implementation class for OOBE/login WebUI screen host. |
49 // It encapsulates controllers, background integration and flow. | 55 // It encapsulates controllers, background integration and flow. |
50 class LoginDisplayHostImpl : public LoginDisplayHost, | 56 class LoginDisplayHostImpl : public LoginDisplayHost, |
51 public content::NotificationObserver, | 57 public content::NotificationObserver, |
52 public content::WebContentsObserver, | 58 public content::WebContentsObserver, |
53 public chromeos::SessionManagerClient::Observer, | 59 public chromeos::SessionManagerClient::Observer, |
54 public chromeos::CrasAudioHandler::AudioObserver, | 60 public chromeos::CrasAudioHandler::AudioObserver, |
| 61 #if !defined(USE_ATHENA) |
55 public ash::VirtualKeyboardStateObserver, | 62 public ash::VirtualKeyboardStateObserver, |
| 63 #endif |
56 public keyboard::KeyboardControllerObserver, | 64 public keyboard::KeyboardControllerObserver, |
57 public gfx::DisplayObserver, | 65 public gfx::DisplayObserver, |
58 public views::WidgetRemovalsObserver { | 66 public views::WidgetRemovalsObserver { |
59 public: | 67 public: |
60 explicit LoginDisplayHostImpl(const gfx::Rect& background_bounds); | 68 explicit LoginDisplayHostImpl(const gfx::Rect& background_bounds); |
61 virtual ~LoginDisplayHostImpl(); | 69 virtual ~LoginDisplayHostImpl(); |
62 | 70 |
63 // Returns the default LoginDisplayHost instance if it has been created. | 71 // Returns the default LoginDisplayHost instance if it has been created. |
64 static LoginDisplayHost* default_host() { | 72 static LoginDisplayHost* default_host() { |
65 return default_host_; | 73 return default_host_; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 | 124 |
117 // Overridden from content::WebContentsObserver: | 125 // Overridden from content::WebContentsObserver: |
118 virtual void RenderProcessGone(base::TerminationStatus status) override; | 126 virtual void RenderProcessGone(base::TerminationStatus status) override; |
119 | 127 |
120 // Overridden from chromeos::SessionManagerClient::Observer: | 128 // Overridden from chromeos::SessionManagerClient::Observer: |
121 virtual void EmitLoginPromptVisibleCalled() override; | 129 virtual void EmitLoginPromptVisibleCalled() override; |
122 | 130 |
123 // Overridden from chromeos::CrasAudioHandler::AudioObserver: | 131 // Overridden from chromeos::CrasAudioHandler::AudioObserver: |
124 virtual void OnActiveOutputNodeChanged() override; | 132 virtual void OnActiveOutputNodeChanged() override; |
125 | 133 |
| 134 #if !defined(USE_ATHENA) |
126 // Overridden from ash::KeyboardStateObserver: | 135 // Overridden from ash::KeyboardStateObserver: |
127 virtual void OnVirtualKeyboardStateChanged(bool activated) override; | 136 virtual void OnVirtualKeyboardStateChanged(bool activated) override; |
| 137 #endif |
128 | 138 |
129 // Overridden from keyboard::KeyboardControllerObserver: | 139 // Overridden from keyboard::KeyboardControllerObserver: |
130 virtual void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) override; | 140 virtual void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) override; |
131 | 141 |
132 // Overridden from gfx::DisplayObserver: | 142 // Overridden from gfx::DisplayObserver: |
133 virtual void OnDisplayAdded(const gfx::Display& new_display) override; | 143 virtual void OnDisplayAdded(const gfx::Display& new_display) override; |
134 virtual void OnDisplayRemoved(const gfx::Display& old_display) override; | 144 virtual void OnDisplayRemoved(const gfx::Display& old_display) override; |
135 virtual void OnDisplayMetricsChanged(const gfx::Display& display, | 145 virtual void OnDisplayMetricsChanged(const gfx::Display& display, |
136 uint32_t changed_metrics) override; | 146 uint32_t changed_metrics) override; |
137 | 147 |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 // Called before host deletion. | 296 // Called before host deletion. |
287 base::Closure completion_callback_; | 297 base::Closure completion_callback_; |
288 | 298 |
289 // Active instance of authentication prewarmer. | 299 // Active instance of authentication prewarmer. |
290 scoped_ptr<AuthPrewarmer> auth_prewarmer_; | 300 scoped_ptr<AuthPrewarmer> auth_prewarmer_; |
291 | 301 |
292 // A focus ring controller to draw focus ring around view for keyboard | 302 // A focus ring controller to draw focus ring around view for keyboard |
293 // driven oobe. | 303 // driven oobe. |
294 scoped_ptr<FocusRingController> focus_ring_controller_; | 304 scoped_ptr<FocusRingController> focus_ring_controller_; |
295 | 305 |
| 306 #if !defined(USE_ATHENA) |
296 // Handles special keys for keyboard driven oobe. | 307 // Handles special keys for keyboard driven oobe. |
297 scoped_ptr<KeyboardDrivenOobeKeyHandler> keyboard_driven_oobe_key_handler_; | 308 scoped_ptr<KeyboardDrivenOobeKeyHandler> keyboard_driven_oobe_key_handler_; |
| 309 #endif |
298 | 310 |
299 FinalizeAnimationType finalize_animation_type_; | 311 FinalizeAnimationType finalize_animation_type_; |
300 | 312 |
301 // Time when login prompt visible signal is received. Used for | 313 // Time when login prompt visible signal is received. Used for |
302 // calculations of delay before startup sound. | 314 // calculations of delay before startup sound. |
303 base::TimeTicks login_prompt_visible_time_; | 315 base::TimeTicks login_prompt_visible_time_; |
304 | 316 |
305 // True when request to play startup sound was sent to | 317 // True when request to play startup sound was sent to |
306 // SoundsManager. | 318 // SoundsManager. |
307 bool startup_sound_played_; | 319 bool startup_sound_played_; |
(...skipping 14 matching lines...) Expand all Loading... |
322 #endif | 334 #endif |
323 | 335 |
324 base::WeakPtrFactory<LoginDisplayHostImpl> animation_weak_ptr_factory_; | 336 base::WeakPtrFactory<LoginDisplayHostImpl> animation_weak_ptr_factory_; |
325 | 337 |
326 DISALLOW_COPY_AND_ASSIGN(LoginDisplayHostImpl); | 338 DISALLOW_COPY_AND_ASSIGN(LoginDisplayHostImpl); |
327 }; | 339 }; |
328 | 340 |
329 } // namespace chromeos | 341 } // namespace chromeos |
330 | 342 |
331 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOGIN_DISPLAY_HOST_IMPL_H_ | 343 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOGIN_DISPLAY_HOST_IMPL_H_ |
OLD | NEW |