| 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 | 9 |
| 10 #include "ash/accelerators/accelerator_controller.h" | 10 #include "ash/accelerators/accelerator_controller.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 #include "ash/system/locale/locale_notification_controller.h" | 52 #include "ash/system/locale/locale_notification_controller.h" |
| 53 #include "ash/system/status_area_widget.h" | 53 #include "ash/system/status_area_widget.h" |
| 54 #include "ash/system/tray/system_tray_delegate.h" | 54 #include "ash/system/tray/system_tray_delegate.h" |
| 55 #include "ash/system/tray/system_tray_notifier.h" | 55 #include "ash/system/tray/system_tray_notifier.h" |
| 56 #include "ash/wm/app_list_controller.h" | 56 #include "ash/wm/app_list_controller.h" |
| 57 #include "ash/wm/ash_focus_rules.h" | 57 #include "ash/wm/ash_focus_rules.h" |
| 58 #include "ash/wm/ash_native_cursor_manager.h" | 58 #include "ash/wm/ash_native_cursor_manager.h" |
| 59 #include "ash/wm/coordinate_conversion.h" | 59 #include "ash/wm/coordinate_conversion.h" |
| 60 #include "ash/wm/event_client_impl.h" | 60 #include "ash/wm/event_client_impl.h" |
| 61 #include "ash/wm/lock_state_controller.h" | 61 #include "ash/wm/lock_state_controller.h" |
| 62 #include "ash/wm/maximize_mode/maximize_mode_controller.h" |
| 62 #include "ash/wm/maximize_mode/maximize_mode_window_manager.h" | 63 #include "ash/wm/maximize_mode/maximize_mode_window_manager.h" |
| 63 #include "ash/wm/mru_window_tracker.h" | 64 #include "ash/wm/mru_window_tracker.h" |
| 64 #include "ash/wm/overlay_event_filter.h" | 65 #include "ash/wm/overlay_event_filter.h" |
| 65 #include "ash/wm/overview/window_selector_controller.h" | 66 #include "ash/wm/overview/window_selector_controller.h" |
| 66 #include "ash/wm/power_button_controller.h" | 67 #include "ash/wm/power_button_controller.h" |
| 67 #include "ash/wm/resize_shadow_controller.h" | 68 #include "ash/wm/resize_shadow_controller.h" |
| 68 #include "ash/wm/root_window_layout_manager.h" | 69 #include "ash/wm/root_window_layout_manager.h" |
| 69 #include "ash/wm/screen_dimmer.h" | 70 #include "ash/wm/screen_dimmer.h" |
| 70 #include "ash/wm/system_gesture_event_filter.h" | 71 #include "ash/wm/system_gesture_event_filter.h" |
| 71 #include "ash/wm/system_modal_container_event_filter.h" | 72 #include "ash/wm/system_modal_container_event_filter.h" |
| (...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 661 RemovePreTargetHandler(system_gesture_filter_.get()); | 662 RemovePreTargetHandler(system_gesture_filter_.get()); |
| 662 RemovePreTargetHandler(keyboard_metrics_filter_.get()); | 663 RemovePreTargetHandler(keyboard_metrics_filter_.get()); |
| 663 if (mouse_cursor_filter_) | 664 if (mouse_cursor_filter_) |
| 664 RemovePreTargetHandler(mouse_cursor_filter_.get()); | 665 RemovePreTargetHandler(mouse_cursor_filter_.get()); |
| 665 | 666 |
| 666 // TooltipController is deleted with the Shell so removing its references. | 667 // TooltipController is deleted with the Shell so removing its references. |
| 667 RemovePreTargetHandler(tooltip_controller_.get()); | 668 RemovePreTargetHandler(tooltip_controller_.get()); |
| 668 | 669 |
| 669 // Destroy maximize window manager early on since it has some observers which | 670 // Destroy maximize window manager early on since it has some observers which |
| 670 // need to be removed. | 671 // need to be removed. |
| 672 maximize_mode_controller_.reset(); |
| 671 maximize_mode_window_manager_.reset(); | 673 maximize_mode_window_manager_.reset(); |
| 672 | 674 |
| 673 // AppList needs to be released before shelf layout manager, which is | 675 // AppList needs to be released before shelf layout manager, which is |
| 674 // destroyed with shelf container in the loop below. However, app list | 676 // destroyed with shelf container in the loop below. However, app list |
| 675 // container is now on top of shelf container and released after it. | 677 // container is now on top of shelf container and released after it. |
| 676 // TODO(xiyuan): Move it back when app list container is no longer needed. | 678 // TODO(xiyuan): Move it back when app list container is no longer needed. |
| 677 app_list_controller_.reset(); | 679 app_list_controller_.reset(); |
| 678 | 680 |
| 679 #if defined(OS_CHROMEOS) | 681 #if defined(OS_CHROMEOS) |
| 680 // Destroy the LastWindowClosedLogoutReminder before the | 682 // Destroy the LastWindowClosedLogoutReminder before the |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 854 | 856 |
| 855 #if defined(OS_CHROMEOS) | 857 #if defined(OS_CHROMEOS) |
| 856 resolution_notification_controller_.reset( | 858 resolution_notification_controller_.reset( |
| 857 new internal::ResolutionNotificationController); | 859 new internal::ResolutionNotificationController); |
| 858 #endif | 860 #endif |
| 859 | 861 |
| 860 cursor_manager_.SetDisplay(GetScreen()->GetPrimaryDisplay()); | 862 cursor_manager_.SetDisplay(GetScreen()->GetPrimaryDisplay()); |
| 861 | 863 |
| 862 nested_dispatcher_controller_.reset(new NestedDispatcherController); | 864 nested_dispatcher_controller_.reset(new NestedDispatcherController); |
| 863 accelerator_controller_.reset(new AcceleratorController); | 865 accelerator_controller_.reset(new AcceleratorController); |
| 866 maximize_mode_controller_.reset(new internal::MaximizeModeController()); |
| 864 | 867 |
| 865 #if defined(OS_CHROMEOS) && defined(USE_X11) | 868 #if defined(OS_CHROMEOS) && defined(USE_X11) |
| 866 magnifier_key_scroll_handler_ = MagnifierKeyScroller::CreateHandler().Pass(); | 869 magnifier_key_scroll_handler_ = MagnifierKeyScroller::CreateHandler().Pass(); |
| 867 AddPreTargetHandler(magnifier_key_scroll_handler_.get()); | 870 AddPreTargetHandler(magnifier_key_scroll_handler_.get()); |
| 868 speech_feedback_handler_ = SpokenFeedbackToggler::CreateHandler().Pass(); | 871 speech_feedback_handler_ = SpokenFeedbackToggler::CreateHandler().Pass(); |
| 869 AddPreTargetHandler(speech_feedback_handler_.get()); | 872 AddPreTargetHandler(speech_feedback_handler_.get()); |
| 870 #endif | 873 #endif |
| 871 | 874 |
| 872 // The order in which event filters are added is significant. | 875 // The order in which event filters are added is significant. |
| 873 | 876 |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1122 //////////////////////////////////////////////////////////////////////////////// | 1125 //////////////////////////////////////////////////////////////////////////////// |
| 1123 // Shell, aura::client::ActivationChangeObserver implementation: | 1126 // Shell, aura::client::ActivationChangeObserver implementation: |
| 1124 | 1127 |
| 1125 void Shell::OnWindowActivated(aura::Window* gained_active, | 1128 void Shell::OnWindowActivated(aura::Window* gained_active, |
| 1126 aura::Window* lost_active) { | 1129 aura::Window* lost_active) { |
| 1127 if (gained_active) | 1130 if (gained_active) |
| 1128 target_root_window_ = gained_active->GetRootWindow(); | 1131 target_root_window_ = gained_active->GetRootWindow(); |
| 1129 } | 1132 } |
| 1130 | 1133 |
| 1131 } // namespace ash | 1134 } // namespace ash |
| OLD | NEW |