| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 #include "ash/ash_constants.h" | 121 #include "ash/ash_constants.h" |
| 122 #include "ash/display/display_change_observer_chromeos.h" | 122 #include "ash/display/display_change_observer_chromeos.h" |
| 123 #include "ash/display/display_error_observer_chromeos.h" | 123 #include "ash/display/display_error_observer_chromeos.h" |
| 124 #include "ash/display/output_configurator_animation.h" | 124 #include "ash/display/output_configurator_animation.h" |
| 125 #include "base/message_loop/message_pump_x11.h" | 125 #include "base/message_loop/message_pump_x11.h" |
| 126 #include "base/sys_info.h" | 126 #include "base/sys_info.h" |
| 127 #include "chromeos/display/output_configurator.h" | 127 #include "chromeos/display/output_configurator.h" |
| 128 #include "content/public/browser/gpu_data_manager.h" | 128 #include "content/public/browser/gpu_data_manager.h" |
| 129 #include "gpu/config/gpu_feature_type.h" | 129 #include "gpu/config/gpu_feature_type.h" |
| 130 #endif // defined(USE_X11) | 130 #endif // defined(USE_X11) |
| 131 #include "ash/sticky_keys/sticky_keys_controller.h" |
| 131 #include "ash/system/chromeos/brightness/brightness_controller_chromeos.h" | 132 #include "ash/system/chromeos/brightness/brightness_controller_chromeos.h" |
| 132 #include "ash/system/chromeos/power/power_event_observer.h" | 133 #include "ash/system/chromeos/power/power_event_observer.h" |
| 133 #include "ash/system/chromeos/power/power_status.h" | 134 #include "ash/system/chromeos/power/power_status.h" |
| 134 #include "ash/system/chromeos/power/user_activity_notifier.h" | 135 #include "ash/system/chromeos/power/user_activity_notifier.h" |
| 135 #include "ash/system/chromeos/power/video_activity_notifier.h" | 136 #include "ash/system/chromeos/power/video_activity_notifier.h" |
| 136 #include "ash/wm/sticky_keys.h" | |
| 137 #endif // defined(OS_CHROMEOS) | 137 #endif // defined(OS_CHROMEOS) |
| 138 | 138 |
| 139 namespace ash { | 139 namespace ash { |
| 140 | 140 |
| 141 namespace { | 141 namespace { |
| 142 | 142 |
| 143 using aura::Window; | 143 using aura::Window; |
| 144 using views::Widget; | 144 using views::Widget; |
| 145 | 145 |
| 146 // A Corewm VisibilityController subclass that calls the Ash animation routine | 146 // A Corewm VisibilityController subclass that calls the Ash animation routine |
| (...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 794 cursor_manager_.SetDisplay(DisplayController::GetPrimaryDisplay()); | 794 cursor_manager_.SetDisplay(DisplayController::GetPrimaryDisplay()); |
| 795 | 795 |
| 796 nested_dispatcher_controller_.reset(new NestedDispatcherController); | 796 nested_dispatcher_controller_.reset(new NestedDispatcherController); |
| 797 accelerator_controller_.reset(new AcceleratorController); | 797 accelerator_controller_.reset(new AcceleratorController); |
| 798 | 798 |
| 799 // The order in which event filters are added is significant. | 799 // The order in which event filters are added is significant. |
| 800 event_rewriter_filter_.reset(new internal::EventRewriterEventFilter); | 800 event_rewriter_filter_.reset(new internal::EventRewriterEventFilter); |
| 801 AddPreTargetHandler(event_rewriter_filter_.get()); | 801 AddPreTargetHandler(event_rewriter_filter_.get()); |
| 802 | 802 |
| 803 #if defined(OS_CHROMEOS) | 803 #if defined(OS_CHROMEOS) |
| 804 // The StickyKeys event filter also rewrites events and must be added | 804 // The StickyKeysController also rewrites events and must be added |
| 805 // before observers, but after the EventRewriterEventFilter. | 805 // before observers, but after the EventRewriterEventFilter. |
| 806 sticky_keys_.reset(new StickyKeys); | 806 sticky_keys_controller_.reset(new StickyKeysController); |
| 807 AddPreTargetHandler(sticky_keys_.get()); | 807 AddPreTargetHandler(sticky_keys_controller_.get()); |
| 808 #endif | 808 #endif |
| 809 | 809 |
| 810 // UserActivityDetector passes events to observers, so let them get | 810 // UserActivityDetector passes events to observers, so let them get |
| 811 // rewritten first. | 811 // rewritten first. |
| 812 user_activity_detector_.reset(new UserActivityDetector); | 812 user_activity_detector_.reset(new UserActivityDetector); |
| 813 AddPreTargetHandler(user_activity_detector_.get()); | 813 AddPreTargetHandler(user_activity_detector_.get()); |
| 814 | 814 |
| 815 overlay_filter_.reset(new internal::OverlayEventFilter); | 815 overlay_filter_.reset(new internal::OverlayEventFilter); |
| 816 AddPreTargetHandler(overlay_filter_.get()); | 816 AddPreTargetHandler(overlay_filter_.get()); |
| 817 AddShellObserver(overlay_filter_.get()); | 817 AddShellObserver(overlay_filter_.get()); |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1031 //////////////////////////////////////////////////////////////////////////////// | 1031 //////////////////////////////////////////////////////////////////////////////// |
| 1032 // Shell, aura::client::ActivationChangeObserver implementation: | 1032 // Shell, aura::client::ActivationChangeObserver implementation: |
| 1033 | 1033 |
| 1034 void Shell::OnWindowActivated(aura::Window* gained_active, | 1034 void Shell::OnWindowActivated(aura::Window* gained_active, |
| 1035 aura::Window* lost_active) { | 1035 aura::Window* lost_active) { |
| 1036 if (gained_active) | 1036 if (gained_active) |
| 1037 target_root_window_ = gained_active->GetRootWindow(); | 1037 target_root_window_ = gained_active->GetRootWindow(); |
| 1038 } | 1038 } |
| 1039 | 1039 |
| 1040 } // namespace ash | 1040 } // namespace ash |
| OLD | NEW |