| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 #include "ash/utility/screenshot_controller.h" | 68 #include "ash/utility/screenshot_controller.h" |
| 69 #include "ash/wm/ash_focus_rules.h" | 69 #include "ash/wm/ash_focus_rules.h" |
| 70 #include "ash/wm/ash_native_cursor_manager.h" | 70 #include "ash/wm/ash_native_cursor_manager.h" |
| 71 #include "ash/wm/event_client_impl.h" | 71 #include "ash/wm/event_client_impl.h" |
| 72 #include "ash/wm/lock_state_controller.h" | 72 #include "ash/wm/lock_state_controller.h" |
| 73 #include "ash/wm/maximize_mode/maximize_mode_controller.h" | 73 #include "ash/wm/maximize_mode/maximize_mode_controller.h" |
| 74 #include "ash/wm/maximize_mode/maximize_mode_window_manager.h" | 74 #include "ash/wm/maximize_mode/maximize_mode_window_manager.h" |
| 75 #include "ash/wm/overlay_event_filter.h" | 75 #include "ash/wm/overlay_event_filter.h" |
| 76 #include "ash/wm/overview/scoped_overview_animation_settings_factory_aura.h" | 76 #include "ash/wm/overview/scoped_overview_animation_settings_factory_aura.h" |
| 77 #include "ash/wm/overview/window_selector_controller.h" | 77 #include "ash/wm/overview/window_selector_controller.h" |
| 78 #include "ash/wm/pinned_controller.h" |
| 78 #include "ash/wm/power_button_controller.h" | 79 #include "ash/wm/power_button_controller.h" |
| 79 #include "ash/wm/resize_shadow_controller.h" | 80 #include "ash/wm/resize_shadow_controller.h" |
| 80 #include "ash/wm/system_gesture_event_filter.h" | 81 #include "ash/wm/system_gesture_event_filter.h" |
| 81 #include "ash/wm/system_modal_container_event_filter.h" | 82 #include "ash/wm/system_modal_container_event_filter.h" |
| 82 #include "ash/wm/system_modal_container_layout_manager.h" | 83 #include "ash/wm/system_modal_container_layout_manager.h" |
| 83 #include "ash/wm/toplevel_window_event_handler.h" | 84 #include "ash/wm/toplevel_window_event_handler.h" |
| 84 #include "ash/wm/video_detector.h" | 85 #include "ash/wm/video_detector.h" |
| 85 #include "ash/wm/window_animations.h" | 86 #include "ash/wm/window_animations.h" |
| 86 #include "ash/wm/window_cycle_controller.h" | 87 #include "ash/wm/window_cycle_controller.h" |
| 87 #include "ash/wm/window_properties.h" | 88 #include "ash/wm/window_properties.h" |
| (...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 784 visibility_controller_.reset(); | 785 visibility_controller_.reset(); |
| 785 // |shelf_item_delegate_manager_| observes |shelf_model_|. It must be | 786 // |shelf_item_delegate_manager_| observes |shelf_model_|. It must be |
| 786 // destroyed before |shelf_model_| is destroyed. | 787 // destroyed before |shelf_model_| is destroyed. |
| 787 shelf_item_delegate_manager_.reset(); | 788 shelf_item_delegate_manager_.reset(); |
| 788 shelf_model_.reset(); | 789 shelf_model_.reset(); |
| 789 | 790 |
| 790 power_button_controller_.reset(); | 791 power_button_controller_.reset(); |
| 791 lock_state_controller_.reset(); | 792 lock_state_controller_.reset(); |
| 792 | 793 |
| 793 #if defined(OS_CHROMEOS) | 794 #if defined(OS_CHROMEOS) |
| 795 window_tree_host_manager_->RemoveObserver(pinned_controller_.get()); |
| 796 wm_shell_common_->RemoveShellObserver(pinned_controller_.get()); |
| 797 pinned_controller_.reset(); |
| 798 #endif |
| 799 |
| 800 #if defined(OS_CHROMEOS) |
| 794 resolution_notification_controller_.reset(); | 801 resolution_notification_controller_.reset(); |
| 795 #endif | 802 #endif |
| 796 desktop_background_controller_.reset(); | 803 desktop_background_controller_.reset(); |
| 797 screenshot_controller_.reset(); | 804 screenshot_controller_.reset(); |
| 798 mouse_cursor_filter_.reset(); | 805 mouse_cursor_filter_.reset(); |
| 799 | 806 |
| 800 #if defined(OS_CHROMEOS) | 807 #if defined(OS_CHROMEOS) |
| 801 touch_transformer_controller_.reset(); | 808 touch_transformer_controller_.reset(); |
| 802 #endif // defined(OS_CHROMEOS) | 809 #endif // defined(OS_CHROMEOS) |
| 803 | 810 |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1008 new ToplevelWindowEventHandler(wm_shell_.get())); | 1015 new ToplevelWindowEventHandler(wm_shell_.get())); |
| 1009 | 1016 |
| 1010 system_gesture_filter_.reset(new SystemGestureEventFilter); | 1017 system_gesture_filter_.reset(new SystemGestureEventFilter); |
| 1011 AddPreTargetHandler(system_gesture_filter_.get()); | 1018 AddPreTargetHandler(system_gesture_filter_.get()); |
| 1012 | 1019 |
| 1013 keyboard_metrics_filter_.reset(new KeyboardUMAEventFilter); | 1020 keyboard_metrics_filter_.reset(new KeyboardUMAEventFilter); |
| 1014 AddPreTargetHandler(keyboard_metrics_filter_.get()); | 1021 AddPreTargetHandler(keyboard_metrics_filter_.get()); |
| 1015 | 1022 |
| 1016 #if defined(OS_CHROMEOS) | 1023 #if defined(OS_CHROMEOS) |
| 1017 sticky_keys_controller_.reset(new StickyKeysController); | 1024 sticky_keys_controller_.reset(new StickyKeysController); |
| 1025 pinned_controller_.reset(new wm::PinnedController); |
| 1026 wm_shell_common_->AddShellObserver(pinned_controller_.get()); |
| 1027 window_tree_host_manager_->AddObserver(pinned_controller_.get()); |
| 1018 #endif | 1028 #endif |
| 1019 | 1029 |
| 1020 lock_state_controller_.reset(new LockStateController); | 1030 lock_state_controller_.reset(new LockStateController); |
| 1021 power_button_controller_.reset(new PowerButtonController( | 1031 power_button_controller_.reset(new PowerButtonController( |
| 1022 lock_state_controller_.get())); | 1032 lock_state_controller_.get())); |
| 1023 #if defined(OS_CHROMEOS) | 1033 #if defined(OS_CHROMEOS) |
| 1024 // Pass the initial display state to PowerButtonController. | 1034 // Pass the initial display state to PowerButtonController. |
| 1025 power_button_controller_->OnDisplayModeChanged( | 1035 power_button_controller_->OnDisplayModeChanged( |
| 1026 display_configurator_->cached_displays()); | 1036 display_configurator_->cached_displays()); |
| 1027 #endif | 1037 #endif |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1243 | 1253 |
| 1244 void Shell::OnWindowActivated( | 1254 void Shell::OnWindowActivated( |
| 1245 aura::client::ActivationChangeObserver::ActivationReason reason, | 1255 aura::client::ActivationChangeObserver::ActivationReason reason, |
| 1246 aura::Window* gained_active, | 1256 aura::Window* gained_active, |
| 1247 aura::Window* lost_active) { | 1257 aura::Window* lost_active) { |
| 1248 if (gained_active) | 1258 if (gained_active) |
| 1249 target_root_window_ = gained_active->GetRootWindow(); | 1259 target_root_window_ = gained_active->GetRootWindow(); |
| 1250 } | 1260 } |
| 1251 | 1261 |
| 1252 } // namespace ash | 1262 } // namespace ash |
| OLD | NEW |