| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "ash/shell.h" | 5 #include "ash/shell.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 #include "ash/display/window_tree_host_manager.h" | 47 #include "ash/display/window_tree_host_manager.h" |
| 48 #include "ash/drag_drop/drag_drop_controller.h" | 48 #include "ash/drag_drop/drag_drop_controller.h" |
| 49 #include "ash/first_run/first_run_helper_impl.h" | 49 #include "ash/first_run/first_run_helper_impl.h" |
| 50 #include "ash/frame/custom_frame_view_ash.h" | 50 #include "ash/frame/custom_frame_view_ash.h" |
| 51 #include "ash/high_contrast/high_contrast_controller.h" | 51 #include "ash/high_contrast/high_contrast_controller.h" |
| 52 #include "ash/host/ash_window_tree_host_init_params.h" | 52 #include "ash/host/ash_window_tree_host_init_params.h" |
| 53 #include "ash/ime/input_method_event_handler.h" | 53 #include "ash/ime/input_method_event_handler.h" |
| 54 #include "ash/keyboard_uma_event_filter.h" | 54 #include "ash/keyboard_uma_event_filter.h" |
| 55 #include "ash/magnifier/magnification_controller.h" | 55 #include "ash/magnifier/magnification_controller.h" |
| 56 #include "ash/magnifier/partial_magnification_controller.h" | 56 #include "ash/magnifier/partial_magnification_controller.h" |
| 57 #include "ash/new_window_delegate.h" | |
| 58 #include "ash/root_window_controller.h" | 57 #include "ash/root_window_controller.h" |
| 59 #include "ash/shelf/shelf.h" | 58 #include "ash/shelf/shelf.h" |
| 60 #include "ash/shelf/shelf_widget.h" | 59 #include "ash/shelf/shelf_widget.h" |
| 61 #include "ash/shelf/shelf_window_watcher.h" | 60 #include "ash/shelf/shelf_window_watcher.h" |
| 62 #include "ash/shell_factory.h" | 61 #include "ash/shell_factory.h" |
| 63 #include "ash/shell_init_params.h" | 62 #include "ash/shell_init_params.h" |
| 64 #include "ash/utility/screenshot_controller.h" | 63 #include "ash/utility/screenshot_controller.h" |
| 65 #include "ash/wm/ash_focus_rules.h" | 64 #include "ash/wm/ash_focus_rules.h" |
| 66 #include "ash/wm/ash_native_cursor_manager.h" | 65 #include "ash/wm/ash_native_cursor_manager.h" |
| 67 #include "ash/wm/event_client_impl.h" | 66 #include "ash/wm/event_client_impl.h" |
| (...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 703 // of its owned RootWindowControllers relies on the value. | 702 // of its owned RootWindowControllers relies on the value. |
| 704 display_manager_->CreateScreenForShutdown(); | 703 display_manager_->CreateScreenForShutdown(); |
| 705 display_configuration_controller_.reset(); | 704 display_configuration_controller_.reset(); |
| 706 | 705 |
| 707 wm_shell_->Shutdown(); | 706 wm_shell_->Shutdown(); |
| 708 // Depends on |focus_client_|, so must be destroyed before. | 707 // Depends on |focus_client_|, so must be destroyed before. |
| 709 window_tree_host_manager_->Shutdown(); | 708 window_tree_host_manager_->Shutdown(); |
| 710 window_tree_host_manager_.reset(); | 709 window_tree_host_manager_.reset(); |
| 711 focus_client_.reset(); | 710 focus_client_.reset(); |
| 712 screen_position_controller_.reset(); | 711 screen_position_controller_.reset(); |
| 713 new_window_delegate_.reset(); | |
| 714 pointer_watcher_delegate_.reset(); | 712 pointer_watcher_delegate_.reset(); |
| 715 | 713 |
| 716 keyboard::KeyboardController::ResetInstance(nullptr); | 714 keyboard::KeyboardController::ResetInstance(nullptr); |
| 717 | 715 |
| 718 #if defined(OS_CHROMEOS) | 716 #if defined(OS_CHROMEOS) |
| 719 display_color_manager_.reset(); | 717 display_color_manager_.reset(); |
| 720 if (display_change_observer_) | 718 if (display_change_observer_) |
| 721 display_configurator_->RemoveObserver(display_change_observer_.get()); | 719 display_configurator_->RemoveObserver(display_change_observer_.get()); |
| 722 if (display_error_observer_) | 720 if (display_error_observer_) |
| 723 display_configurator_->RemoveObserver(display_error_observer_.get()); | 721 display_configurator_->RemoveObserver(display_error_observer_.get()); |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 944 event_client_.reset(new EventClientImpl); | 942 event_client_.reset(new EventClientImpl); |
| 945 | 943 |
| 946 // This controller needs to be set before SetupManagedWindowMode. | 944 // This controller needs to be set before SetupManagedWindowMode. |
| 947 desktop_background_controller_.reset( | 945 desktop_background_controller_.reset( |
| 948 new DesktopBackgroundController(blocking_pool_)); | 946 new DesktopBackgroundController(blocking_pool_)); |
| 949 user_wallpaper_delegate_.reset( | 947 user_wallpaper_delegate_.reset( |
| 950 wm_shell_->delegate()->CreateUserWallpaperDelegate()); | 948 wm_shell_->delegate()->CreateUserWallpaperDelegate()); |
| 951 | 949 |
| 952 session_state_delegate_.reset( | 950 session_state_delegate_.reset( |
| 953 wm_shell_->delegate()->CreateSessionStateDelegate()); | 951 wm_shell_->delegate()->CreateSessionStateDelegate()); |
| 954 new_window_delegate_.reset(wm_shell_->delegate()->CreateNewWindowDelegate()); | |
| 955 pointer_watcher_delegate_ = | 952 pointer_watcher_delegate_ = |
| 956 wm_shell_->delegate()->CreatePointerWatcherDelegate(); | 953 wm_shell_->delegate()->CreatePointerWatcherDelegate(); |
| 957 | 954 |
| 958 resize_shadow_controller_.reset(new ResizeShadowController()); | 955 resize_shadow_controller_.reset(new ResizeShadowController()); |
| 959 shadow_controller_.reset(new ::wm::ShadowController(activation_client_)); | 956 shadow_controller_.reset(new ::wm::ShadowController(activation_client_)); |
| 960 | 957 |
| 961 wm_shell_->SetSystemTrayDelegate( | 958 wm_shell_->SetSystemTrayDelegate( |
| 962 base::WrapUnique(wm_shell_->delegate()->CreateSystemTrayDelegate())); | 959 base::WrapUnique(wm_shell_->delegate()->CreateSystemTrayDelegate())); |
| 963 | 960 |
| 964 locale_notification_controller_.reset(new LocaleNotificationController); | 961 locale_notification_controller_.reset(new LocaleNotificationController); |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1098 | 1095 |
| 1099 void Shell::OnWindowActivated( | 1096 void Shell::OnWindowActivated( |
| 1100 aura::client::ActivationChangeObserver::ActivationReason reason, | 1097 aura::client::ActivationChangeObserver::ActivationReason reason, |
| 1101 aura::Window* gained_active, | 1098 aura::Window* gained_active, |
| 1102 aura::Window* lost_active) { | 1099 aura::Window* lost_active) { |
| 1103 if (gained_active) | 1100 if (gained_active) |
| 1104 target_root_window_ = gained_active->GetRootWindow(); | 1101 target_root_window_ = gained_active->GetRootWindow(); |
| 1105 } | 1102 } |
| 1106 | 1103 |
| 1107 } // namespace ash | 1104 } // namespace ash |
| OLD | NEW |