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; | 46 class KeyboardDrivenOobeKeyHandler; |
44 class OobeUI; | 47 class OobeUI; |
45 class WebUILoginDisplay; | 48 class WebUILoginDisplay; |
46 class WebUILoginView; | 49 class WebUILoginView; |
47 | 50 |
48 // An implementation class for OOBE/login WebUI screen host. | 51 // An implementation class for OOBE/login WebUI screen host. |
49 // It encapsulates controllers, background integration and flow. | 52 // It encapsulates controllers, background integration and flow. |
50 class LoginDisplayHostImpl : public LoginDisplayHost, | 53 class LoginDisplayHostImpl : public LoginDisplayHost, |
51 public content::NotificationObserver, | 54 public content::NotificationObserver, |
52 public content::WebContentsObserver, | 55 public content::WebContentsObserver, |
53 public chromeos::SessionManagerClient::Observer, | 56 public chromeos::SessionManagerClient::Observer, |
54 public chromeos::CrasAudioHandler::AudioObserver, | 57 public chromeos::CrasAudioHandler::AudioObserver, |
| 58 #if !defined(USE_ATHENA) |
55 public ash::VirtualKeyboardStateObserver, | 59 public ash::VirtualKeyboardStateObserver, |
| 60 #endif |
56 public keyboard::KeyboardControllerObserver, | 61 public keyboard::KeyboardControllerObserver, |
57 public gfx::DisplayObserver, | 62 public gfx::DisplayObserver, |
58 public views::WidgetRemovalsObserver { | 63 public views::WidgetRemovalsObserver { |
59 public: | 64 public: |
60 explicit LoginDisplayHostImpl(const gfx::Rect& background_bounds); | 65 explicit LoginDisplayHostImpl(const gfx::Rect& background_bounds); |
61 virtual ~LoginDisplayHostImpl(); | 66 virtual ~LoginDisplayHostImpl(); |
62 | 67 |
63 // Returns the default LoginDisplayHost instance if it has been created. | 68 // Returns the default LoginDisplayHost instance if it has been created. |
64 static LoginDisplayHost* default_host() { | 69 static LoginDisplayHost* default_host() { |
65 return default_host_; | 70 return default_host_; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 | 121 |
117 // Overridden from content::WebContentsObserver: | 122 // Overridden from content::WebContentsObserver: |
118 virtual void RenderProcessGone(base::TerminationStatus status) override; | 123 virtual void RenderProcessGone(base::TerminationStatus status) override; |
119 | 124 |
120 // Overridden from chromeos::SessionManagerClient::Observer: | 125 // Overridden from chromeos::SessionManagerClient::Observer: |
121 virtual void EmitLoginPromptVisibleCalled() override; | 126 virtual void EmitLoginPromptVisibleCalled() override; |
122 | 127 |
123 // Overridden from chromeos::CrasAudioHandler::AudioObserver: | 128 // Overridden from chromeos::CrasAudioHandler::AudioObserver: |
124 virtual void OnActiveOutputNodeChanged() override; | 129 virtual void OnActiveOutputNodeChanged() override; |
125 | 130 |
| 131 #if !defined(USE_ATHENA) |
126 // Overridden from ash::KeyboardStateObserver: | 132 // Overridden from ash::KeyboardStateObserver: |
127 virtual void OnVirtualKeyboardStateChanged(bool activated) override; | 133 virtual void OnVirtualKeyboardStateChanged(bool activated) override; |
| 134 #endif |
128 | 135 |
129 // Overridden from keyboard::KeyboardControllerObserver: | 136 // Overridden from keyboard::KeyboardControllerObserver: |
130 virtual void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) override; | 137 virtual void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) override; |
131 | 138 |
132 // Overridden from gfx::DisplayObserver: | 139 // Overridden from gfx::DisplayObserver: |
133 virtual void OnDisplayAdded(const gfx::Display& new_display) override; | 140 virtual void OnDisplayAdded(const gfx::Display& new_display) override; |
134 virtual void OnDisplayRemoved(const gfx::Display& old_display) override; | 141 virtual void OnDisplayRemoved(const gfx::Display& old_display) override; |
135 virtual void OnDisplayMetricsChanged(const gfx::Display& display, | 142 virtual void OnDisplayMetricsChanged(const gfx::Display& display, |
136 uint32_t changed_metrics) override; | 143 uint32_t changed_metrics) override; |
137 | 144 |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 // Called before host deletion. | 293 // Called before host deletion. |
287 base::Closure completion_callback_; | 294 base::Closure completion_callback_; |
288 | 295 |
289 // Active instance of authentication prewarmer. | 296 // Active instance of authentication prewarmer. |
290 scoped_ptr<AuthPrewarmer> auth_prewarmer_; | 297 scoped_ptr<AuthPrewarmer> auth_prewarmer_; |
291 | 298 |
292 // A focus ring controller to draw focus ring around view for keyboard | 299 // A focus ring controller to draw focus ring around view for keyboard |
293 // driven oobe. | 300 // driven oobe. |
294 scoped_ptr<FocusRingController> focus_ring_controller_; | 301 scoped_ptr<FocusRingController> focus_ring_controller_; |
295 | 302 |
| 303 #if !defined(USE_ATHENA) |
296 // Handles special keys for keyboard driven oobe. | 304 // Handles special keys for keyboard driven oobe. |
297 scoped_ptr<KeyboardDrivenOobeKeyHandler> keyboard_driven_oobe_key_handler_; | 305 scoped_ptr<KeyboardDrivenOobeKeyHandler> keyboard_driven_oobe_key_handler_; |
| 306 #endif |
298 | 307 |
299 FinalizeAnimationType finalize_animation_type_; | 308 FinalizeAnimationType finalize_animation_type_; |
300 | 309 |
301 // Time when login prompt visible signal is received. Used for | 310 // Time when login prompt visible signal is received. Used for |
302 // calculations of delay before startup sound. | 311 // calculations of delay before startup sound. |
303 base::TimeTicks login_prompt_visible_time_; | 312 base::TimeTicks login_prompt_visible_time_; |
304 | 313 |
305 // True when request to play startup sound was sent to | 314 // True when request to play startup sound was sent to |
306 // SoundsManager. | 315 // SoundsManager. |
307 bool startup_sound_played_; | 316 bool startup_sound_played_; |
(...skipping 14 matching lines...) Expand all Loading... |
322 #endif | 331 #endif |
323 | 332 |
324 base::WeakPtrFactory<LoginDisplayHostImpl> animation_weak_ptr_factory_; | 333 base::WeakPtrFactory<LoginDisplayHostImpl> animation_weak_ptr_factory_; |
325 | 334 |
326 DISALLOW_COPY_AND_ASSIGN(LoginDisplayHostImpl); | 335 DISALLOW_COPY_AND_ASSIGN(LoginDisplayHostImpl); |
327 }; | 336 }; |
328 | 337 |
329 } // namespace chromeos | 338 } // namespace chromeos |
330 | 339 |
331 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOGIN_DISPLAY_HOST_IMPL_H_ | 340 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOGIN_DISPLAY_HOST_IMPL_H_ |
OLD | NEW |