| 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" |
| 11 #include "ash/accelerators/accelerator_filter.h" | 11 #include "ash/accelerators/accelerator_delegate.h" |
| 12 #include "ash/accelerators/focus_manager_factory.h" | 12 #include "ash/accelerators/focus_manager_factory.h" |
| 13 #include "ash/accelerators/nested_accelerator_delegate.h" | 13 #include "ash/accelerators/nested_accelerator_delegate.h" |
| 14 #include "ash/accelerometer/accelerometer_controller.h" | 14 #include "ash/accelerometer/accelerometer_controller.h" |
| 15 #include "ash/ash_switches.h" | 15 #include "ash/ash_switches.h" |
| 16 #include "ash/autoclick/autoclick_controller.h" | 16 #include "ash/autoclick/autoclick_controller.h" |
| 17 #include "ash/desktop_background/desktop_background_controller.h" | 17 #include "ash/desktop_background/desktop_background_controller.h" |
| 18 #include "ash/desktop_background/desktop_background_view.h" | 18 #include "ash/desktop_background/desktop_background_view.h" |
| 19 #include "ash/desktop_background/user_wallpaper_delegate.h" | 19 #include "ash/desktop_background/user_wallpaper_delegate.h" |
| 20 #include "ash/display/cursor_window_controller.h" | 20 #include "ash/display/cursor_window_controller.h" |
| 21 #include "ash/display/display_controller.h" | 21 #include "ash/display/display_controller.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 #include "ui/keyboard/keyboard.h" | 98 #include "ui/keyboard/keyboard.h" |
| 99 #include "ui/keyboard/keyboard_controller.h" | 99 #include "ui/keyboard/keyboard_controller.h" |
| 100 #include "ui/keyboard/keyboard_switches.h" | 100 #include "ui/keyboard/keyboard_switches.h" |
| 101 #include "ui/keyboard/keyboard_util.h" | 101 #include "ui/keyboard/keyboard_util.h" |
| 102 #include "ui/message_center/message_center.h" | 102 #include "ui/message_center/message_center.h" |
| 103 #include "ui/views/corewm/tooltip_aura.h" | 103 #include "ui/views/corewm/tooltip_aura.h" |
| 104 #include "ui/views/corewm/tooltip_controller.h" | 104 #include "ui/views/corewm/tooltip_controller.h" |
| 105 #include "ui/views/focus/focus_manager_factory.h" | 105 #include "ui/views/focus/focus_manager_factory.h" |
| 106 #include "ui/views/widget/native_widget_aura.h" | 106 #include "ui/views/widget/native_widget_aura.h" |
| 107 #include "ui/views/widget/widget.h" | 107 #include "ui/views/widget/widget.h" |
| 108 #include "ui/wm/core/accelerator_filter.h" |
| 108 #include "ui/wm/core/compound_event_filter.h" | 109 #include "ui/wm/core/compound_event_filter.h" |
| 109 #include "ui/wm/core/focus_controller.h" | 110 #include "ui/wm/core/focus_controller.h" |
| 110 #include "ui/wm/core/input_method_event_filter.h" | 111 #include "ui/wm/core/input_method_event_filter.h" |
| 111 #include "ui/wm/core/nested_accelerator_controller.h" | 112 #include "ui/wm/core/nested_accelerator_controller.h" |
| 112 #include "ui/wm/core/shadow_controller.h" | 113 #include "ui/wm/core/shadow_controller.h" |
| 113 #include "ui/wm/core/user_activity_detector.h" | 114 #include "ui/wm/core/user_activity_detector.h" |
| 114 #include "ui/wm/core/visibility_controller.h" | 115 #include "ui/wm/core/visibility_controller.h" |
| 115 #include "ui/wm/core/window_modality_controller.h" | 116 #include "ui/wm/core/window_modality_controller.h" |
| 116 | 117 |
| 117 #if defined(OS_CHROMEOS) | 118 #if defined(OS_CHROMEOS) |
| (...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 915 AddPreTargetHandler(user_activity_detector_.get()); | 916 AddPreTargetHandler(user_activity_detector_.get()); |
| 916 | 917 |
| 917 overlay_filter_.reset(new OverlayEventFilter); | 918 overlay_filter_.reset(new OverlayEventFilter); |
| 918 AddPreTargetHandler(overlay_filter_.get()); | 919 AddPreTargetHandler(overlay_filter_.get()); |
| 919 AddShellObserver(overlay_filter_.get()); | 920 AddShellObserver(overlay_filter_.get()); |
| 920 | 921 |
| 921 input_method_filter_.reset(new ::wm::InputMethodEventFilter( | 922 input_method_filter_.reset(new ::wm::InputMethodEventFilter( |
| 922 root_window->GetHost()->GetAcceleratedWidget())); | 923 root_window->GetHost()->GetAcceleratedWidget())); |
| 923 AddPreTargetHandler(input_method_filter_.get()); | 924 AddPreTargetHandler(input_method_filter_.get()); |
| 924 | 925 |
| 925 accelerator_filter_.reset(new AcceleratorFilter); | 926 accelerator_filter_.reset(new ::wm::AcceleratorFilter( |
| 927 scoped_ptr< ::wm::AcceleratorDelegate>(new AcceleratorDelegate).Pass())); |
| 926 AddPreTargetHandler(accelerator_filter_.get()); | 928 AddPreTargetHandler(accelerator_filter_.get()); |
| 927 | 929 |
| 928 event_transformation_handler_.reset(new EventTransformationHandler); | 930 event_transformation_handler_.reset(new EventTransformationHandler); |
| 929 AddPreTargetHandler(event_transformation_handler_.get()); | 931 AddPreTargetHandler(event_transformation_handler_.get()); |
| 930 | 932 |
| 931 toplevel_window_event_handler_.reset(new ToplevelWindowEventHandler); | 933 toplevel_window_event_handler_.reset(new ToplevelWindowEventHandler); |
| 932 | 934 |
| 933 system_gesture_filter_.reset(new SystemGestureEventFilter); | 935 system_gesture_filter_.reset(new SystemGestureEventFilter); |
| 934 AddPreTargetHandler(system_gesture_filter_.get()); | 936 AddPreTargetHandler(system_gesture_filter_.get()); |
| 935 | 937 |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1151 //////////////////////////////////////////////////////////////////////////////// | 1153 //////////////////////////////////////////////////////////////////////////////// |
| 1152 // Shell, aura::client::ActivationChangeObserver implementation: | 1154 // Shell, aura::client::ActivationChangeObserver implementation: |
| 1153 | 1155 |
| 1154 void Shell::OnWindowActivated(aura::Window* gained_active, | 1156 void Shell::OnWindowActivated(aura::Window* gained_active, |
| 1155 aura::Window* lost_active) { | 1157 aura::Window* lost_active) { |
| 1156 if (gained_active) | 1158 if (gained_active) |
| 1157 target_root_window_ = gained_active->GetRootWindow(); | 1159 target_root_window_ = gained_active->GetRootWindow(); |
| 1158 } | 1160 } |
| 1159 | 1161 |
| 1160 } // namespace ash | 1162 } // namespace ash |
| OLD | NEW |