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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 #include "ash/display/display_color_manager_chromeos.h" | 120 #include "ash/display/display_color_manager_chromeos.h" |
121 #include "ash/display/display_error_observer_chromeos.h" | 121 #include "ash/display/display_error_observer_chromeos.h" |
122 #include "ash/display/projecting_observer_chromeos.h" | 122 #include "ash/display/projecting_observer_chromeos.h" |
123 #include "ash/display/resolution_notification_controller.h" | 123 #include "ash/display/resolution_notification_controller.h" |
124 #include "ash/display/screen_orientation_controller_chromeos.h" | 124 #include "ash/display/screen_orientation_controller_chromeos.h" |
125 #include "ash/sticky_keys/sticky_keys_controller.h" | 125 #include "ash/sticky_keys/sticky_keys_controller.h" |
126 #include "ash/system/chromeos/power/power_event_observer.h" | 126 #include "ash/system/chromeos/power/power_event_observer.h" |
127 #include "ash/system/chromeos/power/video_activity_notifier.h" | 127 #include "ash/system/chromeos/power/video_activity_notifier.h" |
128 #include "ash/touch/touch_transformer_controller.h" | 128 #include "ash/touch/touch_transformer_controller.h" |
129 #include "ash/virtual_keyboard_controller.h" | 129 #include "ash/virtual_keyboard_controller.h" |
130 #include "ash/wm/stylus_metrics_recorder.h" | |
131 #include "base/bind_helpers.h" | 130 #include "base/bind_helpers.h" |
132 #include "base/sys_info.h" | 131 #include "base/sys_info.h" |
133 #include "chromeos/audio/audio_a11y_controller.h" | 132 #include "chromeos/audio/audio_a11y_controller.h" |
134 #include "chromeos/dbus/dbus_thread_manager.h" | 133 #include "chromeos/dbus/dbus_thread_manager.h" |
135 #include "ui/chromeos/user_activity_power_manager_notifier.h" | 134 #include "ui/chromeos/user_activity_power_manager_notifier.h" |
136 #include "ui/display/chromeos/display_configurator.h" | 135 #include "ui/display/chromeos/display_configurator.h" |
137 | 136 |
138 #if defined(USE_X11) | 137 #if defined(USE_X11) |
139 #include "ui/display/chromeos/x11/native_display_delegate_x11.h" | 138 #include "ui/display/chromeos/x11/native_display_delegate_x11.h" |
140 #endif | 139 #endif |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 RemovePreTargetHandler(speech_feedback_handler_.get()); | 529 RemovePreTargetHandler(speech_feedback_handler_.get()); |
531 speech_feedback_handler_.reset(); | 530 speech_feedback_handler_.reset(); |
532 #endif | 531 #endif |
533 RemovePreTargetHandler(overlay_filter_.get()); | 532 RemovePreTargetHandler(overlay_filter_.get()); |
534 RemovePreTargetHandler(accelerator_filter_.get()); | 533 RemovePreTargetHandler(accelerator_filter_.get()); |
535 RemovePreTargetHandler(event_transformation_handler_.get()); | 534 RemovePreTargetHandler(event_transformation_handler_.get()); |
536 RemovePreTargetHandler(toplevel_window_event_handler_.get()); | 535 RemovePreTargetHandler(toplevel_window_event_handler_.get()); |
537 RemovePostTargetHandler(toplevel_window_event_handler_.get()); | 536 RemovePostTargetHandler(toplevel_window_event_handler_.get()); |
538 RemovePreTargetHandler(system_gesture_filter_.get()); | 537 RemovePreTargetHandler(system_gesture_filter_.get()); |
539 RemovePreTargetHandler(mouse_cursor_filter_.get()); | 538 RemovePreTargetHandler(mouse_cursor_filter_.get()); |
540 #if defined(OS_CHROMEOS) | |
541 RemovePreTargetHandler(stylus_metrics_recorder_.get()); | |
542 #endif | |
543 RemovePreTargetHandler(modality_filter_.get()); | 539 RemovePreTargetHandler(modality_filter_.get()); |
544 | 540 |
545 // TooltipController is deleted with the Shell so removing its references. | 541 // TooltipController is deleted with the Shell so removing its references. |
546 RemovePreTargetHandler(tooltip_controller_.get()); | 542 RemovePreTargetHandler(tooltip_controller_.get()); |
547 | 543 |
548 #if defined(OS_CHROMEOS) | 544 #if defined(OS_CHROMEOS) |
549 screen_orientation_controller_.reset(); | 545 screen_orientation_controller_.reset(); |
550 screen_layout_observer_.reset(); | 546 screen_layout_observer_.reset(); |
551 #endif | 547 #endif |
552 | 548 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
622 | 618 |
623 #if defined(OS_CHROMEOS) | 619 #if defined(OS_CHROMEOS) |
624 resolution_notification_controller_.reset(); | 620 resolution_notification_controller_.reset(); |
625 #endif | 621 #endif |
626 screenshot_controller_.reset(); | 622 screenshot_controller_.reset(); |
627 mouse_cursor_filter_.reset(); | 623 mouse_cursor_filter_.reset(); |
628 modality_filter_.reset(); | 624 modality_filter_.reset(); |
629 | 625 |
630 #if defined(OS_CHROMEOS) | 626 #if defined(OS_CHROMEOS) |
631 touch_transformer_controller_.reset(); | 627 touch_transformer_controller_.reset(); |
632 stylus_metrics_recorder_.reset(); | |
633 audio_a11y_controller_.reset(); | 628 audio_a11y_controller_.reset(); |
634 #endif // defined(OS_CHROMEOS) | 629 #endif // defined(OS_CHROMEOS) |
635 | 630 |
636 // This also deletes all RootWindows. Note that we invoke Shutdown() on | 631 // This also deletes all RootWindows. Note that we invoke Shutdown() on |
637 // WindowTreeHostManager before resetting |window_tree_host_manager_|, since | 632 // WindowTreeHostManager before resetting |window_tree_host_manager_|, since |
638 // destruction | 633 // destruction |
639 // of its owned RootWindowControllers relies on the value. | 634 // of its owned RootWindowControllers relies on the value. |
640 ScreenAsh::CreateScreenForShutdown(); | 635 ScreenAsh::CreateScreenForShutdown(); |
641 display_configuration_controller_.reset(); | 636 display_configuration_controller_.reset(); |
642 | 637 |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
844 | 839 |
845 drag_drop_controller_.reset(new DragDropController); | 840 drag_drop_controller_.reset(new DragDropController); |
846 // |screenshot_controller_| needs to be created (and prepended as a | 841 // |screenshot_controller_| needs to be created (and prepended as a |
847 // pre-target handler) at this point, because |mouse_cursor_filter_| needs to | 842 // pre-target handler) at this point, because |mouse_cursor_filter_| needs to |
848 // process mouse events prior to screenshot session. | 843 // process mouse events prior to screenshot session. |
849 // See http://crbug.com/459214 | 844 // See http://crbug.com/459214 |
850 screenshot_controller_.reset(new ScreenshotController()); | 845 screenshot_controller_.reset(new ScreenshotController()); |
851 mouse_cursor_filter_.reset(new MouseCursorEventFilter()); | 846 mouse_cursor_filter_.reset(new MouseCursorEventFilter()); |
852 PrependPreTargetHandler(mouse_cursor_filter_.get()); | 847 PrependPreTargetHandler(mouse_cursor_filter_.get()); |
853 | 848 |
854 #if defined(OS_CHROMEOS) | |
855 // |stylus_metrics_recorder| records stylus metrics for certain events. | |
856 // It does not handle/consume any events, so prepend it as a pre-target hander | |
857 // before events are consumed elsewhere. | |
858 stylus_metrics_recorder_.reset(new StylusMetricsRecorder()); | |
859 PrependPreTargetHandler(stylus_metrics_recorder_.get()); | |
860 #endif | |
861 | |
862 // Create Controllers that may need root window. | 849 // Create Controllers that may need root window. |
863 // TODO(oshima): Move as many controllers before creating | 850 // TODO(oshima): Move as many controllers before creating |
864 // RootWindowController as possible. | 851 // RootWindowController as possible. |
865 visibility_controller_.reset(new AshVisibilityController); | 852 visibility_controller_.reset(new AshVisibilityController); |
866 | 853 |
867 magnification_controller_.reset(MagnificationController::CreateInstance()); | 854 magnification_controller_.reset(MagnificationController::CreateInstance()); |
868 wm_shell_->CreateMruWindowTracker(); | 855 wm_shell_->CreateMruWindowTracker(); |
869 | 856 |
870 partial_magnification_controller_.reset(new PartialMagnificationController()); | 857 partial_magnification_controller_.reset(new PartialMagnificationController()); |
871 | 858 |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1018 std::unique_ptr<ui::EventTargetIterator> Shell::GetChildIterator() const { | 1005 std::unique_ptr<ui::EventTargetIterator> Shell::GetChildIterator() const { |
1019 return std::unique_ptr<ui::EventTargetIterator>(); | 1006 return std::unique_ptr<ui::EventTargetIterator>(); |
1020 } | 1007 } |
1021 | 1008 |
1022 ui::EventTargeter* Shell::GetEventTargeter() { | 1009 ui::EventTargeter* Shell::GetEventTargeter() { |
1023 NOTREACHED(); | 1010 NOTREACHED(); |
1024 return nullptr; | 1011 return nullptr; |
1025 } | 1012 } |
1026 | 1013 |
1027 } // namespace ash | 1014 } // namespace ash |
OLD | NEW |