| 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> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
| 16 #include "chrome/browser/chromeos/login/app_launch_controller.h" | 16 #include "chrome/browser/chromeos/login/app_launch_controller.h" |
| 17 #include "chrome/browser/chromeos/login/auth/auth_prewarmer.h" | 17 #include "chrome/browser/chromeos/login/auth/auth_prewarmer.h" |
| 18 #include "chrome/browser/chromeos/login/existing_user_controller.h" | 18 #include "chrome/browser/chromeos/login/existing_user_controller.h" |
| 19 #include "chrome/browser/chromeos/login/signin_screen_controller.h" | 19 #include "chrome/browser/chromeos/login/signin_screen_controller.h" |
| 20 #include "chrome/browser/chromeos/login/ui/login_display.h" | 20 #include "chrome/browser/chromeos/login/ui/login_display.h" |
| 21 #include "chrome/browser/chromeos/login/ui/login_display_host.h" | 21 #include "chrome/browser/chromeos/login/ui/login_display_host.h" |
| 22 #include "chrome/browser/chromeos/login/wizard_controller.h" | 22 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 23 #include "chrome/browser/chromeos/settings/device_settings_service.h" | 23 #include "chrome/browser/chromeos/settings/device_settings_service.h" |
| 24 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h" | 24 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h" |
| 25 #include "chromeos/audio/cras_audio_handler.h" | 25 #include "chromeos/audio/cras_audio_handler.h" |
| 26 #include "chromeos/dbus/session_manager_client.h" | 26 #include "chromeos/dbus/session_manager_client.h" |
| 27 #include "content/public/browser/notification_observer.h" | 27 #include "content/public/browser/notification_observer.h" |
| 28 #include "content/public/browser/notification_registrar.h" | 28 #include "content/public/browser/notification_registrar.h" |
| 29 #include "content/public/browser/web_contents_observer.h" | 29 #include "content/public/browser/web_contents_observer.h" |
| 30 #include "ui/display/display_observer.h" | |
| 31 #include "ui/gfx/geometry/rect.h" | 30 #include "ui/gfx/geometry/rect.h" |
| 32 #include "ui/views/widget/widget_removals_observer.h" | 31 #include "ui/views/widget/widget_removals_observer.h" |
| 33 #include "ui/wm/public/scoped_drag_drop_disabler.h" | 32 #include "ui/wm/public/scoped_drag_drop_disabler.h" |
| 34 | 33 |
| 35 class AccountId; | 34 class AccountId; |
| 36 class ScopedKeepAlive; | 35 class ScopedKeepAlive; |
| 37 | 36 |
| 38 namespace chromeos { | 37 namespace chromeos { |
| 39 | 38 |
| 40 class ArcKioskController; | 39 class ArcKioskController; |
| 41 class DemoAppLauncher; | 40 class DemoAppLauncher; |
| 42 class FocusRingController; | 41 class FocusRingController; |
| 43 class WebUILoginDisplay; | 42 class WebUILoginDisplay; |
| 44 class WebUILoginView; | 43 class WebUILoginView; |
| 45 | 44 |
| 46 // An implementation class for OOBE/login WebUI screen host. | 45 // An implementation class for OOBE/login WebUI screen host. |
| 47 // It encapsulates controllers, wallpaper integration and flow. | 46 // It encapsulates controllers, wallpaper integration and flow. |
| 48 class LoginDisplayHostImpl : public LoginDisplayHost, | 47 class LoginDisplayHostImpl : public LoginDisplayHost, |
| 49 public content::NotificationObserver, | 48 public content::NotificationObserver, |
| 50 public content::WebContentsObserver, | 49 public content::WebContentsObserver, |
| 51 public chromeos::SessionManagerClient::Observer, | 50 public chromeos::SessionManagerClient::Observer, |
| 52 public chromeos::CrasAudioHandler::AudioObserver, | 51 public chromeos::CrasAudioHandler::AudioObserver, |
| 53 public display::DisplayObserver, | |
| 54 public views::WidgetRemovalsObserver, | 52 public views::WidgetRemovalsObserver, |
| 55 public chrome::MultiUserWindowManager::Observer { | 53 public chrome::MultiUserWindowManager::Observer { |
| 56 public: | 54 public: |
| 57 explicit LoginDisplayHostImpl(const gfx::Rect& wallpaper_bounds); | 55 explicit LoginDisplayHostImpl(const gfx::Rect& wallpaper_bounds); |
| 58 ~LoginDisplayHostImpl() override; | 56 ~LoginDisplayHostImpl() override; |
| 59 | 57 |
| 60 // LoginDisplayHost implementation: | 58 // LoginDisplayHost implementation: |
| 61 LoginDisplay* CreateLoginDisplay(LoginDisplay::Delegate* delegate) override; | 59 LoginDisplay* CreateLoginDisplay(LoginDisplay::Delegate* delegate) override; |
| 62 gfx::NativeWindow GetNativeWindow() const override; | 60 gfx::NativeWindow GetNativeWindow() const override; |
| 63 OobeUI* GetOobeUI() const override; | 61 OobeUI* GetOobeUI() const override; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 | 106 |
| 109 // Overridden from content::WebContentsObserver: | 107 // Overridden from content::WebContentsObserver: |
| 110 void RenderProcessGone(base::TerminationStatus status) override; | 108 void RenderProcessGone(base::TerminationStatus status) override; |
| 111 | 109 |
| 112 // Overridden from chromeos::SessionManagerClient::Observer: | 110 // Overridden from chromeos::SessionManagerClient::Observer: |
| 113 void EmitLoginPromptVisibleCalled() override; | 111 void EmitLoginPromptVisibleCalled() override; |
| 114 | 112 |
| 115 // Overridden from chromeos::CrasAudioHandler::AudioObserver: | 113 // Overridden from chromeos::CrasAudioHandler::AudioObserver: |
| 116 void OnActiveOutputNodeChanged() override; | 114 void OnActiveOutputNodeChanged() override; |
| 117 | 115 |
| 118 // Overridden from display::DisplayObserver: | |
| 119 void OnDisplayAdded(const display::Display& new_display) override; | |
| 120 void OnDisplayRemoved(const display::Display& old_display) override; | |
| 121 void OnDisplayMetricsChanged(const display::Display& display, | |
| 122 uint32_t changed_metrics) override; | |
| 123 | |
| 124 // Overriden from views::WidgetRemovalsObserver: | 116 // Overriden from views::WidgetRemovalsObserver: |
| 125 void OnWillRemoveView(views::Widget* widget, views::View* view) override; | 117 void OnWillRemoveView(views::Widget* widget, views::View* view) override; |
| 126 | 118 |
| 127 // Overriden from chrome::MultiUserWindowManager::Observer: | 119 // Overriden from chrome::MultiUserWindowManager::Observer: |
| 128 void OnUserSwitchAnimationFinished() override; | 120 void OnUserSwitchAnimationFinished() override; |
| 129 | 121 |
| 130 private: | 122 private: |
| 131 class LoginWidgetDelegate; | 123 class LoginWidgetDelegate; |
| 132 | 124 |
| 133 // Way to restore if renderer have crashed. | 125 // Way to restore if renderer have crashed. |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 | 298 |
| 307 base::WeakPtrFactory<LoginDisplayHostImpl> pointer_factory_; | 299 base::WeakPtrFactory<LoginDisplayHostImpl> pointer_factory_; |
| 308 base::WeakPtrFactory<LoginDisplayHostImpl> animation_weak_ptr_factory_; | 300 base::WeakPtrFactory<LoginDisplayHostImpl> animation_weak_ptr_factory_; |
| 309 | 301 |
| 310 DISALLOW_COPY_AND_ASSIGN(LoginDisplayHostImpl); | 302 DISALLOW_COPY_AND_ASSIGN(LoginDisplayHostImpl); |
| 311 }; | 303 }; |
| 312 | 304 |
| 313 } // namespace chromeos | 305 } // namespace chromeos |
| 314 | 306 |
| 315 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOGIN_DISPLAY_HOST_IMPL_H_ | 307 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOGIN_DISPLAY_HOST_IMPL_H_ |
| OLD | NEW |