| 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 "ash/shell_observer.h" | |
| 15 #include "base/macros.h" | 14 #include "base/macros.h" |
| 16 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
| 17 #include "chrome/browser/chromeos/login/app_launch_controller.h" | 16 #include "chrome/browser/chromeos/login/app_launch_controller.h" |
| 18 #include "chrome/browser/chromeos/login/auth/auth_prewarmer.h" | 17 #include "chrome/browser/chromeos/login/auth/auth_prewarmer.h" |
| 19 #include "chrome/browser/chromeos/login/existing_user_controller.h" | 18 #include "chrome/browser/chromeos/login/existing_user_controller.h" |
| 20 #include "chrome/browser/chromeos/login/signin_screen_controller.h" | 19 #include "chrome/browser/chromeos/login/signin_screen_controller.h" |
| 21 #include "chrome/browser/chromeos/login/ui/login_display.h" | 20 #include "chrome/browser/chromeos/login/ui/login_display.h" |
| 22 #include "chrome/browser/chromeos/login/ui/login_display_host.h" | 21 #include "chrome/browser/chromeos/login/ui/login_display_host.h" |
| 23 #include "chrome/browser/chromeos/login/wizard_controller.h" | 22 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 24 #include "chrome/browser/chromeos/settings/device_settings_service.h" | 23 #include "chrome/browser/chromeos/settings/device_settings_service.h" |
| 25 #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" |
| 26 #include "chromeos/audio/cras_audio_handler.h" | 25 #include "chromeos/audio/cras_audio_handler.h" |
| 27 #include "chromeos/dbus/session_manager_client.h" | 26 #include "chromeos/dbus/session_manager_client.h" |
| 28 #include "content/public/browser/notification_observer.h" | 27 #include "content/public/browser/notification_observer.h" |
| 29 #include "content/public/browser/notification_registrar.h" | 28 #include "content/public/browser/notification_registrar.h" |
| 30 #include "content/public/browser/web_contents_observer.h" | 29 #include "content/public/browser/web_contents_observer.h" |
| 31 #include "ui/display/display_observer.h" | 30 #include "ui/display/display_observer.h" |
| 32 #include "ui/gfx/geometry/rect.h" | 31 #include "ui/gfx/geometry/rect.h" |
| 33 #include "ui/keyboard/keyboard_controller_observer.h" | |
| 34 #include "ui/views/widget/widget_removals_observer.h" | 32 #include "ui/views/widget/widget_removals_observer.h" |
| 35 #include "ui/wm/public/scoped_drag_drop_disabler.h" | 33 #include "ui/wm/public/scoped_drag_drop_disabler.h" |
| 36 | 34 |
| 37 class AccountId; | 35 class AccountId; |
| 38 class ScopedKeepAlive; | 36 class ScopedKeepAlive; |
| 39 | 37 |
| 40 namespace chromeos { | 38 namespace chromeos { |
| 41 | 39 |
| 42 class ArcKioskController; | 40 class ArcKioskController; |
| 43 class DemoAppLauncher; | 41 class DemoAppLauncher; |
| 44 class FocusRingController; | 42 class FocusRingController; |
| 45 class WebUILoginDisplay; | 43 class WebUILoginDisplay; |
| 46 class WebUILoginView; | 44 class WebUILoginView; |
| 47 | 45 |
| 48 // An implementation class for OOBE/login WebUI screen host. | 46 // An implementation class for OOBE/login WebUI screen host. |
| 49 // It encapsulates controllers, wallpaper integration and flow. | 47 // It encapsulates controllers, wallpaper integration and flow. |
| 50 class LoginDisplayHostImpl : public LoginDisplayHost, | 48 class LoginDisplayHostImpl : public LoginDisplayHost, |
| 51 public content::NotificationObserver, | 49 public content::NotificationObserver, |
| 52 public content::WebContentsObserver, | 50 public content::WebContentsObserver, |
| 53 public chromeos::SessionManagerClient::Observer, | 51 public chromeos::SessionManagerClient::Observer, |
| 54 public chromeos::CrasAudioHandler::AudioObserver, | 52 public chromeos::CrasAudioHandler::AudioObserver, |
| 55 public ash::ShellObserver, | |
| 56 public keyboard::KeyboardControllerObserver, | |
| 57 public display::DisplayObserver, | 53 public display::DisplayObserver, |
| 58 public views::WidgetRemovalsObserver, | 54 public views::WidgetRemovalsObserver, |
| 59 public chrome::MultiUserWindowManager::Observer { | 55 public chrome::MultiUserWindowManager::Observer { |
| 60 public: | 56 public: |
| 61 explicit LoginDisplayHostImpl(const gfx::Rect& wallpaper_bounds); | 57 explicit LoginDisplayHostImpl(const gfx::Rect& wallpaper_bounds); |
| 62 ~LoginDisplayHostImpl() override; | 58 ~LoginDisplayHostImpl() override; |
| 63 | 59 |
| 64 // LoginDisplayHost implementation: | 60 // LoginDisplayHost implementation: |
| 65 LoginDisplay* CreateLoginDisplay(LoginDisplay::Delegate* delegate) override; | 61 LoginDisplay* CreateLoginDisplay(LoginDisplay::Delegate* delegate) override; |
| 66 gfx::NativeWindow GetNativeWindow() const override; | 62 gfx::NativeWindow GetNativeWindow() const override; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 | 110 |
| 115 // Overridden from content::WebContentsObserver: | 111 // Overridden from content::WebContentsObserver: |
| 116 void RenderProcessGone(base::TerminationStatus status) override; | 112 void RenderProcessGone(base::TerminationStatus status) override; |
| 117 | 113 |
| 118 // Overridden from chromeos::SessionManagerClient::Observer: | 114 // Overridden from chromeos::SessionManagerClient::Observer: |
| 119 void EmitLoginPromptVisibleCalled() override; | 115 void EmitLoginPromptVisibleCalled() override; |
| 120 | 116 |
| 121 // Overridden from chromeos::CrasAudioHandler::AudioObserver: | 117 // Overridden from chromeos::CrasAudioHandler::AudioObserver: |
| 122 void OnActiveOutputNodeChanged() override; | 118 void OnActiveOutputNodeChanged() override; |
| 123 | 119 |
| 124 // ash::ShellObserver: | |
| 125 void OnVirtualKeyboardStateChanged(bool activated, | |
| 126 ash::WmWindow* root_window) override; | |
| 127 | |
| 128 // Overridden from keyboard::KeyboardControllerObserver: | |
| 129 void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) override; | |
| 130 void OnKeyboardClosed() override; | |
| 131 | |
| 132 // Overridden from display::DisplayObserver: | 120 // Overridden from display::DisplayObserver: |
| 133 void OnDisplayAdded(const display::Display& new_display) override; | 121 void OnDisplayAdded(const display::Display& new_display) override; |
| 134 void OnDisplayRemoved(const display::Display& old_display) override; | 122 void OnDisplayRemoved(const display::Display& old_display) override; |
| 135 void OnDisplayMetricsChanged(const display::Display& display, | 123 void OnDisplayMetricsChanged(const display::Display& display, |
| 136 uint32_t changed_metrics) override; | 124 uint32_t changed_metrics) override; |
| 137 | 125 |
| 138 // Overriden from views::WidgetRemovalsObserver: | 126 // Overriden from views::WidgetRemovalsObserver: |
| 139 void OnWillRemoveView(views::Widget* widget, views::View* view) override; | 127 void OnWillRemoveView(views::Widget* widget, views::View* view) override; |
| 140 | 128 |
| 141 // Overriden from chrome::MultiUserWindowManager::Observer: | 129 // Overriden from chrome::MultiUserWindowManager::Observer: |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 | 297 |
| 310 // True when request to play startup sound was sent to | 298 // True when request to play startup sound was sent to |
| 311 // SoundsManager. | 299 // SoundsManager. |
| 312 bool startup_sound_played_ = false; | 300 bool startup_sound_played_ = false; |
| 313 | 301 |
| 314 // When true, startup sound should be played only when spoken | 302 // When true, startup sound should be played only when spoken |
| 315 // feedback is enabled. Otherwise, startup sound should be played | 303 // feedback is enabled. Otherwise, startup sound should be played |
| 316 // in any case. | 304 // in any case. |
| 317 bool startup_sound_honors_spoken_feedback_ = false; | 305 bool startup_sound_honors_spoken_feedback_ = false; |
| 318 | 306 |
| 319 // True is subscribed as keyboard controller observer. | |
| 320 bool is_observing_keyboard_ = false; | |
| 321 | |
| 322 // Keeps a copy of the old Drag'n'Drop client, so that it would be disabled | 307 // Keeps a copy of the old Drag'n'Drop client, so that it would be disabled |
| 323 // during a login session and restored afterwards. | 308 // during a login session and restored afterwards. |
| 324 std::unique_ptr<aura::client::ScopedDragDropDisabler> | 309 std::unique_ptr<aura::client::ScopedDragDropDisabler> |
| 325 scoped_drag_drop_disabler_; | 310 scoped_drag_drop_disabler_; |
| 326 | 311 |
| 327 base::WeakPtrFactory<LoginDisplayHostImpl> pointer_factory_; | 312 base::WeakPtrFactory<LoginDisplayHostImpl> pointer_factory_; |
| 328 base::WeakPtrFactory<LoginDisplayHostImpl> animation_weak_ptr_factory_; | 313 base::WeakPtrFactory<LoginDisplayHostImpl> animation_weak_ptr_factory_; |
| 329 | 314 |
| 330 DISALLOW_COPY_AND_ASSIGN(LoginDisplayHostImpl); | 315 DISALLOW_COPY_AND_ASSIGN(LoginDisplayHostImpl); |
| 331 }; | 316 }; |
| 332 | 317 |
| 333 } // namespace chromeos | 318 } // namespace chromeos |
| 334 | 319 |
| 335 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOGIN_DISPLAY_HOST_IMPL_H_ | 320 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOGIN_DISPLAY_HOST_IMPL_H_ |
| OLD | NEW |