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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 #include "ash/display/display_color_manager_chromeos.h" | 121 #include "ash/display/display_color_manager_chromeos.h" |
122 #include "ash/display/display_error_observer_chromeos.h" | 122 #include "ash/display/display_error_observer_chromeos.h" |
123 #include "ash/display/projecting_observer_chromeos.h" | 123 #include "ash/display/projecting_observer_chromeos.h" |
124 #include "ash/display/resolution_notification_controller.h" | 124 #include "ash/display/resolution_notification_controller.h" |
125 #include "ash/display/screen_orientation_controller_chromeos.h" | 125 #include "ash/display/screen_orientation_controller_chromeos.h" |
126 #include "ash/sticky_keys/sticky_keys_controller.h" | 126 #include "ash/sticky_keys/sticky_keys_controller.h" |
127 #include "ash/system/chromeos/power/power_event_observer.h" | 127 #include "ash/system/chromeos/power/power_event_observer.h" |
128 #include "ash/system/chromeos/power/video_activity_notifier.h" | 128 #include "ash/system/chromeos/power/video_activity_notifier.h" |
129 #include "ash/touch/touch_transformer_controller.h" | 129 #include "ash/touch/touch_transformer_controller.h" |
130 #include "ash/virtual_keyboard_controller.h" | 130 #include "ash/virtual_keyboard_controller.h" |
131 #include "ash/wm/stylus_metrics_recorder.h" | |
132 #include "base/bind_helpers.h" | 131 #include "base/bind_helpers.h" |
133 #include "base/sys_info.h" | 132 #include "base/sys_info.h" |
134 #include "chromeos/audio/audio_a11y_controller.h" | 133 #include "chromeos/audio/audio_a11y_controller.h" |
135 #include "chromeos/dbus/dbus_thread_manager.h" | 134 #include "chromeos/dbus/dbus_thread_manager.h" |
136 #include "ui/chromeos/user_activity_power_manager_notifier.h" | 135 #include "ui/chromeos/user_activity_power_manager_notifier.h" |
137 #include "ui/display/chromeos/display_configurator.h" | 136 #include "ui/display/chromeos/display_configurator.h" |
138 | 137 |
139 #if defined(USE_X11) | 138 #if defined(USE_X11) |
140 #include "ui/display/chromeos/x11/native_display_delegate_x11.h" | 139 #include "ui/display/chromeos/x11/native_display_delegate_x11.h" |
141 #endif | 140 #endif |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 RemovePreTargetHandler(speech_feedback_handler_.get()); | 545 RemovePreTargetHandler(speech_feedback_handler_.get()); |
547 speech_feedback_handler_.reset(); | 546 speech_feedback_handler_.reset(); |
548 #endif | 547 #endif |
549 RemovePreTargetHandler(overlay_filter_.get()); | 548 RemovePreTargetHandler(overlay_filter_.get()); |
550 RemovePreTargetHandler(accelerator_filter_.get()); | 549 RemovePreTargetHandler(accelerator_filter_.get()); |
551 RemovePreTargetHandler(event_transformation_handler_.get()); | 550 RemovePreTargetHandler(event_transformation_handler_.get()); |
552 RemovePreTargetHandler(toplevel_window_event_handler_.get()); | 551 RemovePreTargetHandler(toplevel_window_event_handler_.get()); |
553 RemovePostTargetHandler(toplevel_window_event_handler_.get()); | 552 RemovePostTargetHandler(toplevel_window_event_handler_.get()); |
554 RemovePreTargetHandler(system_gesture_filter_.get()); | 553 RemovePreTargetHandler(system_gesture_filter_.get()); |
555 RemovePreTargetHandler(mouse_cursor_filter_.get()); | 554 RemovePreTargetHandler(mouse_cursor_filter_.get()); |
556 #if defined(OS_CHROMEOS) | |
557 RemovePreTargetHandler(stylus_metrics_recorder_.get()); | |
558 #endif | |
559 RemovePreTargetHandler(modality_filter_.get()); | 555 RemovePreTargetHandler(modality_filter_.get()); |
560 | 556 |
561 // TooltipController is deleted with the Shell so removing its references. | 557 // TooltipController is deleted with the Shell so removing its references. |
562 RemovePreTargetHandler(tooltip_controller_.get()); | 558 RemovePreTargetHandler(tooltip_controller_.get()); |
563 | 559 |
564 #if defined(OS_CHROMEOS) | 560 #if defined(OS_CHROMEOS) |
565 screen_orientation_controller_.reset(); | 561 screen_orientation_controller_.reset(); |
566 #endif | 562 #endif |
567 | 563 |
568 // Destroy the virtual keyboard controller before the maximize mode controller | 564 // Destroy the virtual keyboard controller before the maximize mode controller |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
637 #if defined(OS_CHROMEOS) | 633 #if defined(OS_CHROMEOS) |
638 resolution_notification_controller_.reset(); | 634 resolution_notification_controller_.reset(); |
639 #endif | 635 #endif |
640 desktop_background_controller_.reset(); | 636 desktop_background_controller_.reset(); |
641 screenshot_controller_.reset(); | 637 screenshot_controller_.reset(); |
642 mouse_cursor_filter_.reset(); | 638 mouse_cursor_filter_.reset(); |
643 modality_filter_.reset(); | 639 modality_filter_.reset(); |
644 | 640 |
645 #if defined(OS_CHROMEOS) | 641 #if defined(OS_CHROMEOS) |
646 touch_transformer_controller_.reset(); | 642 touch_transformer_controller_.reset(); |
647 stylus_metrics_recorder_.reset(); | 643 #endif // defined(OS_CHROMEOS) |
| 644 |
| 645 #if defined(OS_CHROMEOS) |
648 audio_a11y_controller_.reset(); | 646 audio_a11y_controller_.reset(); |
649 #endif // defined(OS_CHROMEOS) | 647 #endif // defined(OS_CHROMEOS) |
650 | 648 |
651 // This also deletes all RootWindows. Note that we invoke Shutdown() on | 649 // This also deletes all RootWindows. Note that we invoke Shutdown() on |
652 // WindowTreeHostManager before resetting |window_tree_host_manager_|, since | 650 // WindowTreeHostManager before resetting |window_tree_host_manager_|, since |
653 // destruction | 651 // destruction |
654 // of its owned RootWindowControllers relies on the value. | 652 // of its owned RootWindowControllers relies on the value. |
655 display_manager_->CreateScreenForShutdown(); | 653 display_manager_->CreateScreenForShutdown(); |
656 display_configuration_controller_.reset(); | 654 display_configuration_controller_.reset(); |
657 | 655 |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
859 | 857 |
860 drag_drop_controller_.reset(new DragDropController); | 858 drag_drop_controller_.reset(new DragDropController); |
861 // |screenshot_controller_| needs to be created (and prepended as a | 859 // |screenshot_controller_| needs to be created (and prepended as a |
862 // pre-target handler) at this point, because |mouse_cursor_filter_| needs to | 860 // pre-target handler) at this point, because |mouse_cursor_filter_| needs to |
863 // process mouse events prior to screenshot session. | 861 // process mouse events prior to screenshot session. |
864 // See http://crbug.com/459214 | 862 // See http://crbug.com/459214 |
865 screenshot_controller_.reset(new ScreenshotController()); | 863 screenshot_controller_.reset(new ScreenshotController()); |
866 mouse_cursor_filter_.reset(new MouseCursorEventFilter()); | 864 mouse_cursor_filter_.reset(new MouseCursorEventFilter()); |
867 PrependPreTargetHandler(mouse_cursor_filter_.get()); | 865 PrependPreTargetHandler(mouse_cursor_filter_.get()); |
868 | 866 |
869 #if defined(OS_CHROMEOS) | |
870 // |stylus_metrics_recorder| records stylus metrics for certain events. | |
871 // It does not handle/consume any events, so prepend it as a pre-target hander | |
872 // before events are consumed elsewhere. | |
873 stylus_metrics_recorder_.reset(new StylusMetricsRecorder()); | |
874 PrependPreTargetHandler(stylus_metrics_recorder_.get()); | |
875 #endif | |
876 | |
877 // Create Controllers that may need root window. | 867 // Create Controllers that may need root window. |
878 // TODO(oshima): Move as many controllers before creating | 868 // TODO(oshima): Move as many controllers before creating |
879 // RootWindowController as possible. | 869 // RootWindowController as possible. |
880 visibility_controller_.reset(new AshVisibilityController); | 870 visibility_controller_.reset(new AshVisibilityController); |
881 | 871 |
882 magnification_controller_.reset(MagnificationController::CreateInstance()); | 872 magnification_controller_.reset(MagnificationController::CreateInstance()); |
883 wm_shell_->CreateMruWindowTracker(); | 873 wm_shell_->CreateMruWindowTracker(); |
884 | 874 |
885 partial_magnification_controller_.reset(new PartialMagnificationController()); | 875 partial_magnification_controller_.reset(new PartialMagnificationController()); |
886 | 876 |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1040 std::unique_ptr<ui::EventTargetIterator> Shell::GetChildIterator() const { | 1030 std::unique_ptr<ui::EventTargetIterator> Shell::GetChildIterator() const { |
1041 return std::unique_ptr<ui::EventTargetIterator>(); | 1031 return std::unique_ptr<ui::EventTargetIterator>(); |
1042 } | 1032 } |
1043 | 1033 |
1044 ui::EventTargeter* Shell::GetEventTargeter() { | 1034 ui::EventTargeter* Shell::GetEventTargeter() { |
1045 NOTREACHED(); | 1035 NOTREACHED(); |
1046 return nullptr; | 1036 return nullptr; |
1047 } | 1037 } |
1048 | 1038 |
1049 } // namespace ash | 1039 } // namespace ash |
OLD | NEW |