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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 #include "ash/frame/custom_frame_view_ash.h" | 50 #include "ash/frame/custom_frame_view_ash.h" |
51 #include "ash/high_contrast/high_contrast_controller.h" | 51 #include "ash/high_contrast/high_contrast_controller.h" |
52 #include "ash/host/ash_window_tree_host_init_params.h" | 52 #include "ash/host/ash_window_tree_host_init_params.h" |
53 #include "ash/ime/input_method_event_handler.h" | 53 #include "ash/ime/input_method_event_handler.h" |
54 #include "ash/magnifier/magnification_controller.h" | 54 #include "ash/magnifier/magnification_controller.h" |
55 #include "ash/magnifier/partial_magnification_controller.h" | 55 #include "ash/magnifier/partial_magnification_controller.h" |
56 #include "ash/root_window_controller.h" | 56 #include "ash/root_window_controller.h" |
57 #include "ash/shelf/shelf.h" | 57 #include "ash/shelf/shelf.h" |
58 #include "ash/shelf/shelf_widget.h" | 58 #include "ash/shelf/shelf_widget.h" |
59 #include "ash/shell_init_params.h" | 59 #include "ash/shell_init_params.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/lock_state_controller.h" | 65 #include "ash/wm/lock_state_controller.h" |
65 #include "ash/wm/overlay_event_filter.h" | 66 #include "ash/wm/overlay_event_filter.h" |
66 #include "ash/wm/overview/scoped_overview_animation_settings_factory_aura.h" | 67 #include "ash/wm/overview/scoped_overview_animation_settings_factory_aura.h" |
67 #include "ash/wm/power_button_controller.h" | 68 #include "ash/wm/power_button_controller.h" |
68 #include "ash/wm/resize_shadow_controller.h" | 69 #include "ash/wm/resize_shadow_controller.h" |
69 #include "ash/wm/screen_pinning_controller.h" | 70 #include "ash/wm/screen_pinning_controller.h" |
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 RemovePostTargetHandler(toplevel_window_event_handler_.get()); | 582 RemovePostTargetHandler(toplevel_window_event_handler_.get()); |
582 RemovePreTargetHandler(system_gesture_filter_.get()); | 583 RemovePreTargetHandler(system_gesture_filter_.get()); |
583 RemovePreTargetHandler(mouse_cursor_filter_.get()); | 584 RemovePreTargetHandler(mouse_cursor_filter_.get()); |
584 RemovePreTargetHandler(modality_filter_.get()); | 585 RemovePreTargetHandler(modality_filter_.get()); |
585 | 586 |
586 // TooltipController is deleted with the Shell so removing its references. | 587 // TooltipController is deleted with the Shell so removing its references. |
587 RemovePreTargetHandler(tooltip_controller_.get()); | 588 RemovePreTargetHandler(tooltip_controller_.get()); |
588 | 589 |
589 #if defined(OS_CHROMEOS) | 590 #if defined(OS_CHROMEOS) |
590 screen_orientation_controller_.reset(); | 591 screen_orientation_controller_.reset(); |
| 592 screen_layout_observer_.reset(); |
591 #endif | 593 #endif |
592 | 594 |
593 // Destroy the virtual keyboard controller before the maximize mode controller | 595 // Destroy the virtual keyboard controller before the maximize mode controller |
594 // since the latters destructor triggers events that the former is listening | 596 // since the latters destructor triggers events that the former is listening |
595 // to but no longer cares about. | 597 // to but no longer cares about. |
596 #if defined(OS_CHROMEOS) | 598 #if defined(OS_CHROMEOS) |
597 virtual_keyboard_controller_.reset(); | 599 virtual_keyboard_controller_.reset(); |
598 #endif | 600 #endif |
599 | 601 |
600 // Destroy maximize mode controller early on since it has some observers which | 602 // Destroy maximize mode controller early on since it has some observers which |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
974 } | 976 } |
975 | 977 |
976 #if defined(OS_CHROMEOS) | 978 #if defined(OS_CHROMEOS) |
977 power_event_observer_.reset(new PowerEventObserver()); | 979 power_event_observer_.reset(new PowerEventObserver()); |
978 user_activity_notifier_.reset( | 980 user_activity_notifier_.reset( |
979 new ui::UserActivityPowerManagerNotifier(user_activity_detector_.get())); | 981 new ui::UserActivityPowerManagerNotifier(user_activity_detector_.get())); |
980 video_activity_notifier_.reset( | 982 video_activity_notifier_.reset( |
981 new VideoActivityNotifier(video_detector_.get())); | 983 new VideoActivityNotifier(video_detector_.get())); |
982 bluetooth_notification_controller_.reset(new BluetoothNotificationController); | 984 bluetooth_notification_controller_.reset(new BluetoothNotificationController); |
983 screen_orientation_controller_.reset(new ScreenOrientationController()); | 985 screen_orientation_controller_.reset(new ScreenOrientationController()); |
| 986 screen_layout_observer_.reset(new ScreenLayoutObserver()); |
984 #endif | 987 #endif |
985 // The compositor thread and main message loop have to be running in | 988 // The compositor thread and main message loop have to be running in |
986 // order to create mirror window. Run it after the main message loop | 989 // order to create mirror window. Run it after the main message loop |
987 // is started. | 990 // is started. |
988 display_manager_->CreateMirrorWindowAsyncIfAny(); | 991 display_manager_->CreateMirrorWindowAsyncIfAny(); |
989 | 992 |
990 FOR_EACH_OBSERVER(ShellObserver, *wm_shell_->shell_observers(), | 993 FOR_EACH_OBSERVER(ShellObserver, *wm_shell_->shell_observers(), |
991 OnShellInitialized()); | 994 OnShellInitialized()); |
992 | 995 |
993 user_metrics_recorder_->OnShellInitialized(); | 996 user_metrics_recorder_->OnShellInitialized(); |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1059 std::unique_ptr<ui::EventTargetIterator> Shell::GetChildIterator() const { | 1062 std::unique_ptr<ui::EventTargetIterator> Shell::GetChildIterator() const { |
1060 return std::unique_ptr<ui::EventTargetIterator>(); | 1063 return std::unique_ptr<ui::EventTargetIterator>(); |
1061 } | 1064 } |
1062 | 1065 |
1063 ui::EventTargeter* Shell::GetEventTargeter() { | 1066 ui::EventTargeter* Shell::GetEventTargeter() { |
1064 NOTREACHED(); | 1067 NOTREACHED(); |
1065 return nullptr; | 1068 return nullptr; |
1066 } | 1069 } |
1067 | 1070 |
1068 } // namespace ash | 1071 } // namespace ash |
OLD | NEW |