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" | 11 #include "ash/shell_delegate.h" |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
15 #include "chrome/browser/chromeos/login/app_launch_controller.h" | 15 #include "chrome/browser/chromeos/login/app_launch_controller.h" |
16 #include "chrome/browser/chromeos/login/auth/auth_prewarmer.h" | 16 #include "chrome/browser/chromeos/login/auth/auth_prewarmer.h" |
17 #include "chrome/browser/chromeos/login/existing_user_controller.h" | 17 #include "chrome/browser/chromeos/login/existing_user_controller.h" |
18 #include "chrome/browser/chromeos/login/ui/login_display.h" | 18 #include "chrome/browser/chromeos/login/ui/login_display.h" |
19 #include "chrome/browser/chromeos/login/ui/login_display_host.h" | 19 #include "chrome/browser/chromeos/login/ui/login_display_host.h" |
20 #include "chrome/browser/chromeos/login/wizard_controller.h" | 20 #include "chrome/browser/chromeos/login/wizard_controller.h" |
21 #include "chrome/browser/chromeos/settings/device_settings_service.h" | 21 #include "chrome/browser/chromeos/settings/device_settings_service.h" |
22 #include "chromeos/audio/cras_audio_handler.h" | 22 #include "chromeos/audio/cras_audio_handler.h" |
23 #include "chromeos/dbus/session_manager_client.h" | 23 #include "chromeos/dbus/session_manager_client.h" |
24 #include "content/public/browser/notification_observer.h" | 24 #include "content/public/browser/notification_observer.h" |
25 #include "content/public/browser/notification_registrar.h" | 25 #include "content/public/browser/notification_registrar.h" |
26 #include "content/public/browser/web_contents_observer.h" | 26 #include "content/public/browser/web_contents_observer.h" |
27 #include "ui/gfx/display_observer.h" | 27 #include "ui/gfx/display_observer.h" |
28 #include "ui/gfx/rect.h" | 28 #include "ui/gfx/rect.h" |
29 #include "ui/keyboard/keyboard_controller_observer.h" | 29 #include "ui/keyboard/keyboard_controller_observer.h" |
| 30 #include "ui/views/widget/widget_removals_observer.h" |
30 | 31 |
31 class PrefService; | 32 class PrefService; |
32 | 33 |
33 namespace content { | 34 namespace content { |
34 class RenderFrameHost; | 35 class RenderFrameHost; |
35 class WebContents; | 36 class WebContents; |
36 } | 37 } |
37 | 38 |
38 namespace chromeos { | 39 namespace chromeos { |
39 | 40 |
40 class DemoAppLauncher; | 41 class DemoAppLauncher; |
41 class FocusRingController; | 42 class FocusRingController; |
42 class KeyboardDrivenOobeKeyHandler; | 43 class KeyboardDrivenOobeKeyHandler; |
43 class OobeUI; | 44 class OobeUI; |
44 class WebUILoginDisplay; | 45 class WebUILoginDisplay; |
45 class WebUILoginView; | 46 class WebUILoginView; |
46 | 47 |
47 // An implementation class for OOBE/login WebUI screen host. | 48 // An implementation class for OOBE/login WebUI screen host. |
48 // It encapsulates controllers, background integration and flow. | 49 // It encapsulates controllers, background integration and flow. |
49 class LoginDisplayHostImpl : public LoginDisplayHost, | 50 class LoginDisplayHostImpl : public LoginDisplayHost, |
50 public content::NotificationObserver, | 51 public content::NotificationObserver, |
51 public content::WebContentsObserver, | 52 public content::WebContentsObserver, |
52 public chromeos::SessionManagerClient::Observer, | 53 public chromeos::SessionManagerClient::Observer, |
53 public chromeos::CrasAudioHandler::AudioObserver, | 54 public chromeos::CrasAudioHandler::AudioObserver, |
54 public ash::VirtualKeyboardStateObserver, | 55 public ash::VirtualKeyboardStateObserver, |
55 public keyboard::KeyboardControllerObserver, | 56 public keyboard::KeyboardControllerObserver, |
56 public gfx::DisplayObserver { | 57 public gfx::DisplayObserver, |
| 58 public views::WidgetRemovalsObserver { |
57 public: | 59 public: |
58 explicit LoginDisplayHostImpl(const gfx::Rect& background_bounds); | 60 explicit LoginDisplayHostImpl(const gfx::Rect& background_bounds); |
59 virtual ~LoginDisplayHostImpl(); | 61 virtual ~LoginDisplayHostImpl(); |
60 | 62 |
61 // Returns the default LoginDisplayHost instance if it has been created. | 63 // Returns the default LoginDisplayHost instance if it has been created. |
62 static LoginDisplayHost* default_host() { | 64 static LoginDisplayHost* default_host() { |
63 return default_host_; | 65 return default_host_; |
64 } | 66 } |
65 | 67 |
66 // Gets the Gaia auth iframe within a WebContents. | 68 // Gets the Gaia auth iframe within a WebContents. |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 | 132 |
131 // Overridden from keyboard::KeyboardControllerObserver: | 133 // Overridden from keyboard::KeyboardControllerObserver: |
132 virtual void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) OVERRIDE; | 134 virtual void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) OVERRIDE; |
133 | 135 |
134 // Overridden from gfx::DisplayObserver: | 136 // Overridden from gfx::DisplayObserver: |
135 virtual void OnDisplayAdded(const gfx::Display& new_display) OVERRIDE; | 137 virtual void OnDisplayAdded(const gfx::Display& new_display) OVERRIDE; |
136 virtual void OnDisplayRemoved(const gfx::Display& old_display) OVERRIDE; | 138 virtual void OnDisplayRemoved(const gfx::Display& old_display) OVERRIDE; |
137 virtual void OnDisplayMetricsChanged(const gfx::Display& display, | 139 virtual void OnDisplayMetricsChanged(const gfx::Display& display, |
138 uint32_t changed_metrics) OVERRIDE; | 140 uint32_t changed_metrics) OVERRIDE; |
139 | 141 |
| 142 // Overriden from views::WidgetRemovalsObserver: |
| 143 virtual void OnWillRemoveView(views::Widget* widget, |
| 144 views::View* view) OVERRIDE; |
| 145 |
140 private: | 146 private: |
141 // Way to restore if renderer have crashed. | 147 // Way to restore if renderer have crashed. |
142 enum RestorePath { | 148 enum RestorePath { |
143 RESTORE_UNKNOWN, | 149 RESTORE_UNKNOWN, |
144 RESTORE_WIZARD, | 150 RESTORE_WIZARD, |
145 RESTORE_SIGN_IN, | 151 RESTORE_SIGN_IN, |
146 RESTORE_ADD_USER_INTO_SESSION, | 152 RESTORE_ADD_USER_INTO_SESSION, |
147 }; | 153 }; |
148 | 154 |
149 // Type of animations to run after the login screen. | 155 // Type of animations to run after the login screen. |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 | 322 |
317 // The bounds of the virtual keyboard. | 323 // The bounds of the virtual keyboard. |
318 gfx::Rect keyboard_bounds_; | 324 gfx::Rect keyboard_bounds_; |
319 | 325 |
320 DISALLOW_COPY_AND_ASSIGN(LoginDisplayHostImpl); | 326 DISALLOW_COPY_AND_ASSIGN(LoginDisplayHostImpl); |
321 }; | 327 }; |
322 | 328 |
323 } // namespace chromeos | 329 } // namespace chromeos |
324 | 330 |
325 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOGIN_DISPLAY_HOST_IMPL_H_ | 331 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOGIN_DISPLAY_HOST_IMPL_H_ |
OLD | NEW |