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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 #include "ash/display/event_transformation_handler.h" | 45 #include "ash/display/event_transformation_handler.h" |
46 #include "ash/display/mouse_cursor_event_filter.h" | 46 #include "ash/display/mouse_cursor_event_filter.h" |
47 #include "ash/display/screen_ash.h" | 47 #include "ash/display/screen_ash.h" |
48 #include "ash/display/screen_position_controller.h" | 48 #include "ash/display/screen_position_controller.h" |
49 #include "ash/display/window_tree_host_manager.h" | 49 #include "ash/display/window_tree_host_manager.h" |
50 #include "ash/drag_drop/drag_drop_controller.h" | 50 #include "ash/drag_drop/drag_drop_controller.h" |
51 #include "ash/first_run/first_run_helper_impl.h" | 51 #include "ash/first_run/first_run_helper_impl.h" |
52 #include "ash/high_contrast/high_contrast_controller.h" | 52 #include "ash/high_contrast/high_contrast_controller.h" |
53 #include "ash/host/ash_window_tree_host_init_params.h" | 53 #include "ash/host/ash_window_tree_host_init_params.h" |
54 #include "ash/ime/input_method_event_handler.h" | 54 #include "ash/ime/input_method_event_handler.h" |
| 55 #include "ash/laser/laser_pointer_controller.h" |
55 #include "ash/magnifier/magnification_controller.h" | 56 #include "ash/magnifier/magnification_controller.h" |
56 #include "ash/magnifier/partial_magnification_controller.h" | 57 #include "ash/magnifier/partial_magnification_controller.h" |
57 #include "ash/root_window_controller.h" | 58 #include "ash/root_window_controller.h" |
58 #include "ash/shell_init_params.h" | 59 #include "ash/shell_init_params.h" |
59 #include "ash/system/chromeos/screen_layout_observer.h" | 60 #include "ash/system/chromeos/screen_layout_observer.h" |
60 #include "ash/utility/screenshot_controller.h" | 61 #include "ash/utility/screenshot_controller.h" |
61 #include "ash/wm/ash_focus_rules.h" | 62 #include "ash/wm/ash_focus_rules.h" |
62 #include "ash/wm/ash_native_cursor_manager.h" | 63 #include "ash/wm/ash_native_cursor_manager.h" |
63 #include "ash/wm/event_client_impl.h" | 64 #include "ash/wm/event_client_impl.h" |
64 #include "ash/wm/immersive_handler_factory_ash.h" | 65 #include "ash/wm/immersive_handler_factory_ash.h" |
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 // Destroy all child windows including widgets. | 603 // Destroy all child windows including widgets. |
603 window_tree_host_manager_->CloseChildWindows(); | 604 window_tree_host_manager_->CloseChildWindows(); |
604 // MruWindowTracker must be destroyed after all windows have been deleted to | 605 // MruWindowTracker must be destroyed after all windows have been deleted to |
605 // avoid a possible crash when Shell is destroyed from a non-normal shutdown | 606 // avoid a possible crash when Shell is destroyed from a non-normal shutdown |
606 // path. (crbug.com/485438). | 607 // path. (crbug.com/485438). |
607 wm_shell_->DeleteMruWindowTracker(); | 608 wm_shell_->DeleteMruWindowTracker(); |
608 | 609 |
609 // These need a valid Shell instance to clean up properly, so explicitly | 610 // These need a valid Shell instance to clean up properly, so explicitly |
610 // delete them before invalidating the instance. | 611 // delete them before invalidating the instance. |
611 // Alphabetical. TODO(oshima): sort. | 612 // Alphabetical. TODO(oshima): sort. |
| 613 laser_pointer_controller_.reset(); |
612 magnification_controller_.reset(); | 614 magnification_controller_.reset(); |
613 partial_magnification_controller_.reset(); | 615 partial_magnification_controller_.reset(); |
614 tooltip_controller_.reset(); | 616 tooltip_controller_.reset(); |
615 event_client_.reset(); | 617 event_client_.reset(); |
616 toplevel_window_event_handler_.reset(); | 618 toplevel_window_event_handler_.reset(); |
617 visibility_controller_.reset(); | 619 visibility_controller_.reset(); |
618 | 620 |
619 power_button_controller_.reset(); | 621 power_button_controller_.reset(); |
620 lock_state_controller_.reset(); | 622 lock_state_controller_.reset(); |
621 | 623 |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
858 // before events are consumed elsewhere. | 860 // before events are consumed elsewhere. |
859 stylus_metrics_recorder_.reset(new StylusMetricsRecorder()); | 861 stylus_metrics_recorder_.reset(new StylusMetricsRecorder()); |
860 PrependPreTargetHandler(stylus_metrics_recorder_.get()); | 862 PrependPreTargetHandler(stylus_metrics_recorder_.get()); |
861 #endif | 863 #endif |
862 | 864 |
863 // Create Controllers that may need root window. | 865 // Create Controllers that may need root window. |
864 // TODO(oshima): Move as many controllers before creating | 866 // TODO(oshima): Move as many controllers before creating |
865 // RootWindowController as possible. | 867 // RootWindowController as possible. |
866 visibility_controller_.reset(new AshVisibilityController); | 868 visibility_controller_.reset(new AshVisibilityController); |
867 | 869 |
| 870 laser_pointer_controller_.reset(new LaserPointerController()); |
| 871 |
868 magnification_controller_.reset(MagnificationController::CreateInstance()); | 872 magnification_controller_.reset(MagnificationController::CreateInstance()); |
869 wm_shell_->CreateMruWindowTracker(); | 873 wm_shell_->CreateMruWindowTracker(); |
870 | 874 |
871 partial_magnification_controller_.reset(new PartialMagnificationController()); | 875 partial_magnification_controller_.reset(new PartialMagnificationController()); |
872 | 876 |
873 autoclick_controller_.reset(AutoclickController::CreateInstance()); | 877 autoclick_controller_.reset(AutoclickController::CreateInstance()); |
874 | 878 |
875 high_contrast_controller_.reset(new HighContrastController); | 879 high_contrast_controller_.reset(new HighContrastController); |
876 video_detector_.reset(new VideoDetector); | 880 video_detector_.reset(new VideoDetector); |
877 | 881 |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1019 std::unique_ptr<ui::EventTargetIterator> Shell::GetChildIterator() const { | 1023 std::unique_ptr<ui::EventTargetIterator> Shell::GetChildIterator() const { |
1020 return std::unique_ptr<ui::EventTargetIterator>(); | 1024 return std::unique_ptr<ui::EventTargetIterator>(); |
1021 } | 1025 } |
1022 | 1026 |
1023 ui::EventTargeter* Shell::GetEventTargeter() { | 1027 ui::EventTargeter* Shell::GetEventTargeter() { |
1024 NOTREACHED(); | 1028 NOTREACHED(); |
1025 return nullptr; | 1029 return nullptr; |
1026 } | 1030 } |
1027 | 1031 |
1028 } // namespace ash | 1032 } // namespace ash |
OLD | NEW |