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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 #include "ui/wm/core/input_method_event_filter.h" | 107 #include "ui/wm/core/input_method_event_filter.h" |
108 #include "ui/wm/core/shadow_controller.h" | 108 #include "ui/wm/core/shadow_controller.h" |
109 #include "ui/wm/core/user_activity_detector.h" | 109 #include "ui/wm/core/user_activity_detector.h" |
110 #include "ui/wm/core/visibility_controller.h" | 110 #include "ui/wm/core/visibility_controller.h" |
111 #include "ui/wm/core/window_modality_controller.h" | 111 #include "ui/wm/core/window_modality_controller.h" |
112 | 112 |
113 #if defined(OS_CHROMEOS) | 113 #if defined(OS_CHROMEOS) |
114 #if defined(USE_X11) | 114 #if defined(USE_X11) |
115 #include "ash/accelerators/magnifier_key_scroller.h" | 115 #include "ash/accelerators/magnifier_key_scroller.h" |
116 #include "ash/accelerators/spoken_feedback_toggler.h" | 116 #include "ash/accelerators/spoken_feedback_toggler.h" |
| 117 #include "ash/touch/touch_transformer_controller.h" |
117 #include "ui/gfx/x/x11_types.h" | 118 #include "ui/gfx/x/x11_types.h" |
118 #endif // defined(USE_X11) | 119 #endif // defined(USE_X11) |
119 #include "ash/ash_constants.h" | 120 #include "ash/ash_constants.h" |
120 #include "ash/display/display_change_observer_chromeos.h" | 121 #include "ash/display/display_change_observer_chromeos.h" |
121 #include "ash/display/display_configurator_animation.h" | 122 #include "ash/display/display_configurator_animation.h" |
122 #include "ash/display/display_error_observer_chromeos.h" | 123 #include "ash/display/display_error_observer_chromeos.h" |
123 #include "ash/display/projecting_observer_chromeos.h" | 124 #include "ash/display/projecting_observer_chromeos.h" |
124 #include "ash/display/resolution_notification_controller.h" | 125 #include "ash/display/resolution_notification_controller.h" |
125 #include "ash/sticky_keys/sticky_keys_controller.h" | 126 #include "ash/sticky_keys/sticky_keys_controller.h" |
126 #include "ash/system/chromeos/bluetooth/bluetooth_notification_controller.h" | 127 #include "ash/system/chromeos/bluetooth/bluetooth_notification_controller.h" |
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
749 | 750 |
750 power_button_controller_.reset(); | 751 power_button_controller_.reset(); |
751 lock_state_controller_.reset(); | 752 lock_state_controller_.reset(); |
752 | 753 |
753 #if defined(OS_CHROMEOS) | 754 #if defined(OS_CHROMEOS) |
754 resolution_notification_controller_.reset(); | 755 resolution_notification_controller_.reset(); |
755 #endif | 756 #endif |
756 desktop_background_controller_.reset(); | 757 desktop_background_controller_.reset(); |
757 mouse_cursor_filter_.reset(); | 758 mouse_cursor_filter_.reset(); |
758 | 759 |
| 760 #if defined(OS_CHROMEOS) && defined(USE_X11) |
| 761 touch_transformer_controller_.reset(); |
| 762 #endif // defined(OS_CHROMEOS) && defined(USE_X11) |
| 763 |
759 // This also deletes all RootWindows. Note that we invoke Shutdown() on | 764 // This also deletes all RootWindows. Note that we invoke Shutdown() on |
760 // DisplayController before resetting |display_controller_|, since destruction | 765 // DisplayController before resetting |display_controller_|, since destruction |
761 // of its owned RootWindowControllers relies on the value. | 766 // of its owned RootWindowControllers relies on the value. |
762 display_manager_->CreateScreenForShutdown(); | 767 display_manager_->CreateScreenForShutdown(); |
763 display_controller_->Shutdown(); | 768 display_controller_->Shutdown(); |
764 display_controller_.reset(); | 769 display_controller_.reset(); |
765 screen_position_controller_.reset(); | 770 screen_position_controller_.reset(); |
766 accessibility_delegate_.reset(); | 771 accessibility_delegate_.reset(); |
767 new_window_delegate_.reset(); | 772 new_window_delegate_.reset(); |
768 media_delegate_.reset(); | 773 media_delegate_.reset(); |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
980 // Initialize system_tray_delegate_ after StatusAreaWidget is created. | 985 // Initialize system_tray_delegate_ after StatusAreaWidget is created. |
981 system_tray_delegate_->Initialize(); | 986 system_tray_delegate_->Initialize(); |
982 | 987 |
983 #if defined(OS_CHROMEOS) | 988 #if defined(OS_CHROMEOS) |
984 // Create the LogoutConfirmationController after the SystemTrayDelegate. | 989 // Create the LogoutConfirmationController after the SystemTrayDelegate. |
985 logout_confirmation_controller_.reset(new LogoutConfirmationController( | 990 logout_confirmation_controller_.reset(new LogoutConfirmationController( |
986 base::Bind(&SystemTrayDelegate::SignOut, | 991 base::Bind(&SystemTrayDelegate::SignOut, |
987 base::Unretained(system_tray_delegate_.get())))); | 992 base::Unretained(system_tray_delegate_.get())))); |
988 #endif | 993 #endif |
989 | 994 |
| 995 #if defined(OS_CHROMEOS) && defined(USE_X11) |
| 996 // Create TouchTransformerController before DisplayController::InitDisplays() |
| 997 // since TouchTransformerController listens on |
| 998 // DisplayController::Observer::OnDisplaysInitialized(). |
| 999 touch_transformer_controller_.reset(new TouchTransformerController()); |
| 1000 #endif // defined(OS_CHROMEOS) && defined(USE_X11) |
| 1001 |
990 display_controller_->InitDisplays(); | 1002 display_controller_->InitDisplays(); |
991 | 1003 |
992 // It needs to be created after RootWindowController has been created | 1004 // It needs to be created after RootWindowController has been created |
993 // (which calls OnWindowResized has been called, otherwise the | 1005 // (which calls OnWindowResized has been called, otherwise the |
994 // widget will not paint when restoring after a browser crash. Also it needs | 1006 // widget will not paint when restoring after a browser crash. Also it needs |
995 // to be created after InitSecondaryDisplays() to initialize the wallpapers in | 1007 // to be created after InitSecondaryDisplays() to initialize the wallpapers in |
996 // the correct size. | 1008 // the correct size. |
997 user_wallpaper_delegate_->InitializeWallpaper(); | 1009 user_wallpaper_delegate_->InitializeWallpaper(); |
998 | 1010 |
999 if (initially_hide_cursor_) | 1011 if (initially_hide_cursor_) |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1116 //////////////////////////////////////////////////////////////////////////////// | 1128 //////////////////////////////////////////////////////////////////////////////// |
1117 // Shell, aura::client::ActivationChangeObserver implementation: | 1129 // Shell, aura::client::ActivationChangeObserver implementation: |
1118 | 1130 |
1119 void Shell::OnWindowActivated(aura::Window* gained_active, | 1131 void Shell::OnWindowActivated(aura::Window* gained_active, |
1120 aura::Window* lost_active) { | 1132 aura::Window* lost_active) { |
1121 if (gained_active) | 1133 if (gained_active) |
1122 target_root_window_ = gained_active->GetRootWindow(); | 1134 target_root_window_ = gained_active->GetRootWindow(); |
1123 } | 1135 } |
1124 | 1136 |
1125 } // namespace ash | 1137 } // namespace ash |
OLD | NEW |