| 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 |
| 11 #include "ash/accelerators/accelerator_controller.h" | 11 #include "ash/accelerators/accelerator_controller.h" |
| 12 #include "ash/accelerators/accelerator_delegate.h" | 12 #include "ash/accelerators/accelerator_delegate.h" |
| 13 #include "ash/accelerators/focus_manager_factory.h" | 13 #include "ash/accelerators/focus_manager_factory.h" |
| 14 #include "ash/aura/wm_shell_aura.h" | 14 #include "ash/aura/wm_shell_aura.h" |
| 15 #include "ash/aura/wm_window_aura.h" | 15 #include "ash/aura/wm_window_aura.h" |
| 16 #include "ash/autoclick/autoclick_controller.h" | 16 #include "ash/autoclick/autoclick_controller.h" |
| 17 #include "ash/common/accessibility_delegate.h" | 17 #include "ash/common/accessibility_delegate.h" |
| 18 #include "ash/common/ash_switches.h" | 18 #include "ash/common/ash_switches.h" |
| 19 #include "ash/common/keyboard/keyboard_ui.h" | 19 #include "ash/common/keyboard/keyboard_ui.h" |
| 20 #include "ash/common/session/session_state_delegate.h" | 20 #include "ash/common/session/session_state_delegate.h" |
| 21 #include "ash/common/shelf/shelf_item_delegate.h" | 21 #include "ash/common/shelf/shelf_item_delegate.h" |
| 22 #include "ash/common/shelf/shelf_item_delegate_manager.h" | 22 #include "ash/common/shelf/shelf_item_delegate_manager.h" |
| 23 #include "ash/common/shelf/shelf_model.h" | 23 #include "ash/common/shelf/shelf_model.h" |
| 24 #include "ash/common/shell_window_ids.h" | 24 #include "ash/common/shell_window_ids.h" |
| 25 #include "ash/common/system/locale/locale_notification_controller.h" | 25 #include "ash/common/system/locale/locale_notification_controller.h" |
| 26 #include "ash/common/system/tray/system_tray_delegate.h" | 26 #include "ash/common/system/tray/system_tray_delegate.h" |
| 27 #include "ash/common/wm/mru_window_tracker.h" | 27 #include "ash/common/wm/mru_window_tracker.h" |
| 28 #include "ash/common/wm/overview/window_selector_controller.h" | |
| 29 #include "ash/common/wm/root_window_finder.h" | 28 #include "ash/common/wm/root_window_finder.h" |
| 30 #include "ash/common/wm/window_positioner.h" | 29 #include "ash/common/wm/window_positioner.h" |
| 31 #include "ash/common/wm_shell.h" | 30 #include "ash/common/wm_shell.h" |
| 32 #include "ash/common/wm_shell_common.h" | 31 #include "ash/common/wm_shell_common.h" |
| 33 #include "ash/desktop_background/desktop_background_controller.h" | 32 #include "ash/desktop_background/desktop_background_controller.h" |
| 34 #include "ash/desktop_background/desktop_background_view.h" | 33 #include "ash/desktop_background/desktop_background_view.h" |
| 35 #include "ash/desktop_background/user_wallpaper_delegate.h" | 34 #include "ash/desktop_background/user_wallpaper_delegate.h" |
| 36 #include "ash/display/cursor_window_controller.h" | 35 #include "ash/display/cursor_window_controller.h" |
| 37 #include "ash/display/display_configuration_controller.h" | 36 #include "ash/display/display_configuration_controller.h" |
| 38 #include "ash/display/display_manager.h" | 37 #include "ash/display/display_manager.h" |
| (...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 722 // VideoDetectorObserver interface. | 721 // VideoDetectorObserver interface. |
| 723 video_activity_notifier_.reset(); | 722 video_activity_notifier_.reset(); |
| 724 #endif // defined(OS_CHROMEOS) | 723 #endif // defined(OS_CHROMEOS) |
| 725 video_detector_.reset(); | 724 video_detector_.reset(); |
| 726 high_contrast_controller_.reset(); | 725 high_contrast_controller_.reset(); |
| 727 | 726 |
| 728 shadow_controller_.reset(); | 727 shadow_controller_.reset(); |
| 729 resize_shadow_controller_.reset(); | 728 resize_shadow_controller_.reset(); |
| 730 | 729 |
| 731 window_cycle_controller_.reset(); | 730 window_cycle_controller_.reset(); |
| 732 window_selector_controller_.reset(); | 731 wm_shell_->DeleteWindowSelectorController(); |
| 733 | 732 |
| 734 // |shelf_window_watcher_| has a weak pointer to |shelf_Model_| | 733 // |shelf_window_watcher_| has a weak pointer to |shelf_Model_| |
| 735 // and has window observers. | 734 // and has window observers. |
| 736 shelf_window_watcher_.reset(); | 735 shelf_window_watcher_.reset(); |
| 737 | 736 |
| 738 // Destroy all child windows including widgets. | 737 // Destroy all child windows including widgets. |
| 739 window_tree_host_manager_->CloseChildWindows(); | 738 window_tree_host_manager_->CloseChildWindows(); |
| 740 // MruWindowTracker must be destroyed after all windows have been deleted to | 739 // MruWindowTracker must be destroyed after all windows have been deleted to |
| 741 // avoid a possible crash when Shell is destroyed from a non-normal shutdown | 740 // avoid a possible crash when Shell is destroyed from a non-normal shutdown |
| 742 // path. (crbug.com/485438). | 741 // path. (crbug.com/485438). |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1023 MagnificationController::CreateInstance()); | 1022 MagnificationController::CreateInstance()); |
| 1024 wm_shell_common_->CreateMruWindowTracker(); | 1023 wm_shell_common_->CreateMruWindowTracker(); |
| 1025 | 1024 |
| 1026 partial_magnification_controller_.reset( | 1025 partial_magnification_controller_.reset( |
| 1027 new PartialMagnificationController()); | 1026 new PartialMagnificationController()); |
| 1028 | 1027 |
| 1029 autoclick_controller_.reset(AutoclickController::CreateInstance()); | 1028 autoclick_controller_.reset(AutoclickController::CreateInstance()); |
| 1030 | 1029 |
| 1031 high_contrast_controller_.reset(new HighContrastController); | 1030 high_contrast_controller_.reset(new HighContrastController); |
| 1032 video_detector_.reset(new VideoDetector); | 1031 video_detector_.reset(new VideoDetector); |
| 1033 window_selector_controller_.reset(new WindowSelectorController()); | |
| 1034 window_cycle_controller_.reset(new WindowCycleController()); | 1032 window_cycle_controller_.reset(new WindowCycleController()); |
| 1035 | 1033 |
| 1036 tooltip_controller_.reset(new views::corewm::TooltipController( | 1034 tooltip_controller_.reset(new views::corewm::TooltipController( |
| 1037 std::unique_ptr<views::corewm::Tooltip>(new views::corewm::TooltipAura))); | 1035 std::unique_ptr<views::corewm::Tooltip>(new views::corewm::TooltipAura))); |
| 1038 AddPreTargetHandler(tooltip_controller_.get()); | 1036 AddPreTargetHandler(tooltip_controller_.get()); |
| 1039 | 1037 |
| 1040 event_client_.reset(new EventClientImpl); | 1038 event_client_.reset(new EventClientImpl); |
| 1041 | 1039 |
| 1042 // This controller needs to be set before SetupManagedWindowMode. | 1040 // This controller needs to be set before SetupManagedWindowMode. |
| 1043 desktop_background_controller_.reset( | 1041 desktop_background_controller_.reset( |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1212 | 1210 |
| 1213 void Shell::OnWindowActivated( | 1211 void Shell::OnWindowActivated( |
| 1214 aura::client::ActivationChangeObserver::ActivationReason reason, | 1212 aura::client::ActivationChangeObserver::ActivationReason reason, |
| 1215 aura::Window* gained_active, | 1213 aura::Window* gained_active, |
| 1216 aura::Window* lost_active) { | 1214 aura::Window* lost_active) { |
| 1217 if (gained_active) | 1215 if (gained_active) |
| 1218 target_root_window_ = gained_active->GetRootWindow(); | 1216 target_root_window_ = gained_active->GetRootWindow(); |
| 1219 } | 1217 } |
| 1220 | 1218 |
| 1221 } // namespace ash | 1219 } // namespace ash |
| OLD | NEW |