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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 #include "ui/wm/core/nested_accelerator_controller.h" | 111 #include "ui/wm/core/nested_accelerator_controller.h" |
112 #include "ui/wm/core/shadow_controller.h" | 112 #include "ui/wm/core/shadow_controller.h" |
113 #include "ui/wm/core/user_activity_detector.h" | 113 #include "ui/wm/core/user_activity_detector.h" |
114 #include "ui/wm/core/visibility_controller.h" | 114 #include "ui/wm/core/visibility_controller.h" |
115 #include "ui/wm/core/window_modality_controller.h" | 115 #include "ui/wm/core/window_modality_controller.h" |
116 | 116 |
117 #if defined(OS_CHROMEOS) | 117 #if defined(OS_CHROMEOS) |
118 #if defined(USE_X11) | 118 #if defined(USE_X11) |
119 #include "ash/accelerators/magnifier_key_scroller.h" | 119 #include "ash/accelerators/magnifier_key_scroller.h" |
120 #include "ash/accelerators/spoken_feedback_toggler.h" | 120 #include "ash/accelerators/spoken_feedback_toggler.h" |
121 #include "ash/touch/touch_transformer_controller.h" | |
122 #include "ui/gfx/x/x11_types.h" | 121 #include "ui/gfx/x/x11_types.h" |
123 #endif // defined(USE_X11) | 122 #endif // defined(USE_X11) |
124 #include "ash/ash_constants.h" | 123 #include "ash/ash_constants.h" |
125 #include "ash/display/display_change_observer_chromeos.h" | 124 #include "ash/display/display_change_observer_chromeos.h" |
126 #include "ash/display/display_configurator_animation.h" | 125 #include "ash/display/display_configurator_animation.h" |
127 #include "ash/display/display_error_observer_chromeos.h" | 126 #include "ash/display/display_error_observer_chromeos.h" |
128 #include "ash/display/projecting_observer_chromeos.h" | 127 #include "ash/display/projecting_observer_chromeos.h" |
129 #include "ash/display/resolution_notification_controller.h" | 128 #include "ash/display/resolution_notification_controller.h" |
130 #include "ash/sticky_keys/sticky_keys_controller.h" | 129 #include "ash/sticky_keys/sticky_keys_controller.h" |
131 #include "ash/system/chromeos/bluetooth/bluetooth_notification_controller.h" | 130 #include "ash/system/chromeos/bluetooth/bluetooth_notification_controller.h" |
132 #include "ash/system/chromeos/brightness/brightness_controller_chromeos.h" | 131 #include "ash/system/chromeos/brightness/brightness_controller_chromeos.h" |
133 #include "ash/system/chromeos/power/power_event_observer.h" | 132 #include "ash/system/chromeos/power/power_event_observer.h" |
134 #include "ash/system/chromeos/power/power_status.h" | 133 #include "ash/system/chromeos/power/power_status.h" |
135 #include "ash/system/chromeos/power/video_activity_notifier.h" | 134 #include "ash/system/chromeos/power/video_activity_notifier.h" |
136 #include "ash/system/chromeos/session/last_window_closed_logout_reminder.h" | 135 #include "ash/system/chromeos/session/last_window_closed_logout_reminder.h" |
137 #include "ash/system/chromeos/session/logout_confirmation_controller.h" | 136 #include "ash/system/chromeos/session/logout_confirmation_controller.h" |
| 137 #include "ash/touch/touch_transformer_controller.h" |
138 #include "base/bind_helpers.h" | 138 #include "base/bind_helpers.h" |
139 #include "base/sys_info.h" | 139 #include "base/sys_info.h" |
140 #include "ui/chromeos/user_activity_power_manager_notifier.h" | 140 #include "ui/chromeos/user_activity_power_manager_notifier.h" |
141 #include "ui/display/chromeos/display_configurator.h" | 141 #include "ui/display/chromeos/display_configurator.h" |
142 #endif // defined(OS_CHROMEOS) | 142 #endif // defined(OS_CHROMEOS) |
143 | 143 |
144 namespace ash { | 144 namespace ash { |
145 | 145 |
146 namespace { | 146 namespace { |
147 | 147 |
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
764 | 764 |
765 power_button_controller_.reset(); | 765 power_button_controller_.reset(); |
766 lock_state_controller_.reset(); | 766 lock_state_controller_.reset(); |
767 | 767 |
768 #if defined(OS_CHROMEOS) | 768 #if defined(OS_CHROMEOS) |
769 resolution_notification_controller_.reset(); | 769 resolution_notification_controller_.reset(); |
770 #endif | 770 #endif |
771 desktop_background_controller_.reset(); | 771 desktop_background_controller_.reset(); |
772 mouse_cursor_filter_.reset(); | 772 mouse_cursor_filter_.reset(); |
773 | 773 |
774 #if defined(OS_CHROMEOS) && defined(USE_X11) | 774 #if defined(OS_CHROMEOS) |
775 touch_transformer_controller_.reset(); | 775 touch_transformer_controller_.reset(); |
776 #endif // defined(OS_CHROMEOS) && defined(USE_X11) | 776 #endif // defined(OS_CHROMEOS) |
777 | 777 |
778 // This also deletes all RootWindows. Note that we invoke Shutdown() on | 778 // This also deletes all RootWindows. Note that we invoke Shutdown() on |
779 // DisplayController before resetting |display_controller_|, since destruction | 779 // DisplayController before resetting |display_controller_|, since destruction |
780 // of its owned RootWindowControllers relies on the value. | 780 // of its owned RootWindowControllers relies on the value. |
781 display_manager_->CreateScreenForShutdown(); | 781 display_manager_->CreateScreenForShutdown(); |
782 display_controller_->Shutdown(); | 782 display_controller_->Shutdown(); |
783 display_controller_.reset(); | 783 display_controller_.reset(); |
784 screen_position_controller_.reset(); | 784 screen_position_controller_.reset(); |
785 accessibility_delegate_.reset(); | 785 accessibility_delegate_.reset(); |
786 new_window_delegate_.reset(); | 786 new_window_delegate_.reset(); |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1000 // Initialize system_tray_delegate_ after StatusAreaWidget is created. | 1000 // Initialize system_tray_delegate_ after StatusAreaWidget is created. |
1001 system_tray_delegate_->Initialize(); | 1001 system_tray_delegate_->Initialize(); |
1002 | 1002 |
1003 #if defined(OS_CHROMEOS) | 1003 #if defined(OS_CHROMEOS) |
1004 // Create the LogoutConfirmationController after the SystemTrayDelegate. | 1004 // Create the LogoutConfirmationController after the SystemTrayDelegate. |
1005 logout_confirmation_controller_.reset(new LogoutConfirmationController( | 1005 logout_confirmation_controller_.reset(new LogoutConfirmationController( |
1006 base::Bind(&SystemTrayDelegate::SignOut, | 1006 base::Bind(&SystemTrayDelegate::SignOut, |
1007 base::Unretained(system_tray_delegate_.get())))); | 1007 base::Unretained(system_tray_delegate_.get())))); |
1008 #endif | 1008 #endif |
1009 | 1009 |
1010 #if defined(OS_CHROMEOS) && defined(USE_X11) | 1010 #if defined(OS_CHROMEOS) |
1011 // Create TouchTransformerController before DisplayController::InitDisplays() | 1011 // Create TouchTransformerController before DisplayController::InitDisplays() |
1012 // since TouchTransformerController listens on | 1012 // since TouchTransformerController listens on |
1013 // DisplayController::Observer::OnDisplaysInitialized(). | 1013 // DisplayController::Observer::OnDisplaysInitialized(). |
1014 touch_transformer_controller_.reset(new TouchTransformerController()); | 1014 touch_transformer_controller_.reset(new TouchTransformerController()); |
1015 #endif // defined(OS_CHROMEOS) && defined(USE_X11) | 1015 #endif // defined(OS_CHROMEOS) |
1016 | 1016 |
1017 display_controller_->InitDisplays(); | 1017 display_controller_->InitDisplays(); |
1018 | 1018 |
1019 // It needs to be created after RootWindowController has been created | 1019 // It needs to be created after RootWindowController has been created |
1020 // (which calls OnWindowResized has been called, otherwise the | 1020 // (which calls OnWindowResized has been called, otherwise the |
1021 // widget will not paint when restoring after a browser crash. Also it needs | 1021 // widget will not paint when restoring after a browser crash. Also it needs |
1022 // to be created after InitSecondaryDisplays() to initialize the wallpapers in | 1022 // to be created after InitSecondaryDisplays() to initialize the wallpapers in |
1023 // the correct size. | 1023 // the correct size. |
1024 user_wallpaper_delegate_->InitializeWallpaper(); | 1024 user_wallpaper_delegate_->InitializeWallpaper(); |
1025 | 1025 |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1143 //////////////////////////////////////////////////////////////////////////////// | 1143 //////////////////////////////////////////////////////////////////////////////// |
1144 // Shell, aura::client::ActivationChangeObserver implementation: | 1144 // Shell, aura::client::ActivationChangeObserver implementation: |
1145 | 1145 |
1146 void Shell::OnWindowActivated(aura::Window* gained_active, | 1146 void Shell::OnWindowActivated(aura::Window* gained_active, |
1147 aura::Window* lost_active) { | 1147 aura::Window* lost_active) { |
1148 if (gained_active) | 1148 if (gained_active) |
1149 target_root_window_ = gained_active->GetRootWindow(); | 1149 target_root_window_ = gained_active->GetRootWindow(); |
1150 } | 1150 } |
1151 | 1151 |
1152 } // namespace ash | 1152 } // namespace ash |
OLD | NEW |