Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1389)

Side by Side Diff: ash/shell.cc

Issue 289283015: Extract touchscreen device management into a generic manager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 #include "ui/wm/core/input_method_event_filter.h" 110 #include "ui/wm/core/input_method_event_filter.h"
111 #include "ui/wm/core/shadow_controller.h" 111 #include "ui/wm/core/shadow_controller.h"
112 #include "ui/wm/core/user_activity_detector.h" 112 #include "ui/wm/core/user_activity_detector.h"
113 #include "ui/wm/core/visibility_controller.h" 113 #include "ui/wm/core/visibility_controller.h"
114 #include "ui/wm/core/window_modality_controller.h" 114 #include "ui/wm/core/window_modality_controller.h"
115 115
116 #if defined(OS_CHROMEOS) 116 #if defined(OS_CHROMEOS)
117 #if defined(USE_X11) 117 #if defined(USE_X11)
118 #include "ash/accelerators/magnifier_key_scroller.h" 118 #include "ash/accelerators/magnifier_key_scroller.h"
119 #include "ash/accelerators/spoken_feedback_toggler.h" 119 #include "ash/accelerators/spoken_feedback_toggler.h"
120 #include "ash/touch/touch_transformer_controller.h"
121 #include "ui/gfx/x/x11_types.h" 120 #include "ui/gfx/x/x11_types.h"
122 #endif // defined(USE_X11) 121 #endif // defined(USE_X11)
123 #include "ash/ash_constants.h" 122 #include "ash/ash_constants.h"
124 #include "ash/display/display_change_observer_chromeos.h" 123 #include "ash/display/display_change_observer_chromeos.h"
125 #include "ash/display/display_configurator_animation.h" 124 #include "ash/display/display_configurator_animation.h"
126 #include "ash/display/display_error_observer_chromeos.h" 125 #include "ash/display/display_error_observer_chromeos.h"
127 #include "ash/display/projecting_observer_chromeos.h" 126 #include "ash/display/projecting_observer_chromeos.h"
128 #include "ash/display/resolution_notification_controller.h" 127 #include "ash/display/resolution_notification_controller.h"
129 #include "ash/sticky_keys/sticky_keys_controller.h" 128 #include "ash/sticky_keys/sticky_keys_controller.h"
130 #include "ash/system/chromeos/bluetooth/bluetooth_notification_controller.h" 129 #include "ash/system/chromeos/bluetooth/bluetooth_notification_controller.h"
131 #include "ash/system/chromeos/brightness/brightness_controller_chromeos.h" 130 #include "ash/system/chromeos/brightness/brightness_controller_chromeos.h"
132 #include "ash/system/chromeos/power/power_event_observer.h" 131 #include "ash/system/chromeos/power/power_event_observer.h"
133 #include "ash/system/chromeos/power/power_status.h" 132 #include "ash/system/chromeos/power/power_status.h"
134 #include "ash/system/chromeos/power/video_activity_notifier.h" 133 #include "ash/system/chromeos/power/video_activity_notifier.h"
135 #include "ash/system/chromeos/session/last_window_closed_logout_reminder.h" 134 #include "ash/system/chromeos/session/last_window_closed_logout_reminder.h"
136 #include "ash/system/chromeos/session/logout_confirmation_controller.h" 135 #include "ash/system/chromeos/session/logout_confirmation_controller.h"
136 #include "ash/touch/touch_transformer_controller.h"
137 #include "base/bind_helpers.h" 137 #include "base/bind_helpers.h"
138 #include "base/sys_info.h" 138 #include "base/sys_info.h"
139 #include "ui/chromeos/user_activity_power_manager_notifier.h" 139 #include "ui/chromeos/user_activity_power_manager_notifier.h"
140 #include "ui/display/chromeos/display_configurator.h" 140 #include "ui/display/chromeos/display_configurator.h"
141 #endif // defined(OS_CHROMEOS) 141 #endif // defined(OS_CHROMEOS)
142 142
143 namespace ash { 143 namespace ash {
144 144
145 namespace { 145 namespace {
146 146
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 763
764 power_button_controller_.reset(); 764 power_button_controller_.reset();
765 lock_state_controller_.reset(); 765 lock_state_controller_.reset();
766 766
767 #if defined(OS_CHROMEOS) 767 #if defined(OS_CHROMEOS)
768 resolution_notification_controller_.reset(); 768 resolution_notification_controller_.reset();
769 #endif 769 #endif
770 desktop_background_controller_.reset(); 770 desktop_background_controller_.reset();
771 mouse_cursor_filter_.reset(); 771 mouse_cursor_filter_.reset();
772 772
773 #if defined(OS_CHROMEOS) && defined(USE_X11) 773 #if defined(OS_CHROMEOS)
774 touch_transformer_controller_.reset(); 774 touch_transformer_controller_.reset();
775 #endif // defined(OS_CHROMEOS) && defined(USE_X11) 775 #endif // defined(OS_CHROMEOS)
776 776
777 // This also deletes all RootWindows. Note that we invoke Shutdown() on 777 // This also deletes all RootWindows. Note that we invoke Shutdown() on
778 // DisplayController before resetting |display_controller_|, since destruction 778 // DisplayController before resetting |display_controller_|, since destruction
779 // of its owned RootWindowControllers relies on the value. 779 // of its owned RootWindowControllers relies on the value.
780 display_manager_->CreateScreenForShutdown(); 780 display_manager_->CreateScreenForShutdown();
781 display_controller_->Shutdown(); 781 display_controller_->Shutdown();
782 display_controller_.reset(); 782 display_controller_.reset();
783 screen_position_controller_.reset(); 783 screen_position_controller_.reset();
784 accessibility_delegate_.reset(); 784 accessibility_delegate_.reset();
785 new_window_delegate_.reset(); 785 new_window_delegate_.reset();
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698