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

Side by Side Diff: ash/shell.cc

Issue 688183002: Refactor TouchTransformerConverter to allow support for Ozone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mv-touch-transformer
Patch Set: Rebased Created 6 years, 1 month 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
« no previous file with comments | « ash/shell.h ('k') | ash/touch/touch_transformer_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 "ash/virtual_keyboard_controller.h" 138 #include "ash/virtual_keyboard_controller.h"
139 #include "base/bind_helpers.h" 139 #include "base/bind_helpers.h"
140 #include "base/sys_info.h" 140 #include "base/sys_info.h"
141 #include "chromeos/dbus/dbus_thread_manager.h" 141 #include "chromeos/dbus/dbus_thread_manager.h"
142 #include "ui/chromeos/user_activity_power_manager_notifier.h" 142 #include "ui/chromeos/user_activity_power_manager_notifier.h"
143 #include "ui/display/chromeos/display_configurator.h" 143 #include "ui/display/chromeos/display_configurator.h"
144 #endif // defined(OS_CHROMEOS) 144 #endif // defined(OS_CHROMEOS)
145 145
146 namespace ash { 146 namespace ash {
147 147
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 777
778 power_button_controller_.reset(); 778 power_button_controller_.reset();
779 lock_state_controller_.reset(); 779 lock_state_controller_.reset();
780 780
781 #if defined(OS_CHROMEOS) 781 #if defined(OS_CHROMEOS)
782 resolution_notification_controller_.reset(); 782 resolution_notification_controller_.reset();
783 #endif 783 #endif
784 desktop_background_controller_.reset(); 784 desktop_background_controller_.reset();
785 mouse_cursor_filter_.reset(); 785 mouse_cursor_filter_.reset();
786 786
787 #if defined(OS_CHROMEOS) && defined(USE_X11) 787 #if defined(OS_CHROMEOS)
788 touch_transformer_controller_.reset(); 788 touch_transformer_controller_.reset();
789 #endif // defined(OS_CHROMEOS) && defined(USE_X11) 789 #endif // defined(OS_CHROMEOS)
790 790
791 // This also deletes all RootWindows. Note that we invoke Shutdown() on 791 // This also deletes all RootWindows. Note that we invoke Shutdown() on
792 // DisplayController before resetting |display_controller_|, since destruction 792 // DisplayController before resetting |display_controller_|, since destruction
793 // of its owned RootWindowControllers relies on the value. 793 // of its owned RootWindowControllers relies on the value.
794 display_manager_->CreateScreenForShutdown(); 794 display_manager_->CreateScreenForShutdown();
795 display_controller_->Shutdown(); 795 display_controller_->Shutdown();
796 display_controller_.reset(); 796 display_controller_.reset();
797 #if defined(OS_CHROMEOS) 797 #if defined(OS_CHROMEOS)
798 virtual_keyboard_controller_.reset(); 798 virtual_keyboard_controller_.reset();
799 #endif 799 #endif
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
1014 locale_notification_controller_.reset(new LocaleNotificationController); 1014 locale_notification_controller_.reset(new LocaleNotificationController);
1015 1015
1016 // Initialize system_tray_delegate_ after StatusAreaWidget is created. 1016 // Initialize system_tray_delegate_ after StatusAreaWidget is created.
1017 system_tray_delegate_->Initialize(); 1017 system_tray_delegate_->Initialize();
1018 1018
1019 #if defined(OS_CHROMEOS) 1019 #if defined(OS_CHROMEOS)
1020 // Create the LogoutConfirmationController after the SystemTrayDelegate. 1020 // Create the LogoutConfirmationController after the SystemTrayDelegate.
1021 logout_confirmation_controller_.reset(new LogoutConfirmationController( 1021 logout_confirmation_controller_.reset(new LogoutConfirmationController(
1022 base::Bind(&SystemTrayDelegate::SignOut, 1022 base::Bind(&SystemTrayDelegate::SignOut,
1023 base::Unretained(system_tray_delegate_.get())))); 1023 base::Unretained(system_tray_delegate_.get()))));
1024 #endif
1025 1024
1026 #if defined(OS_CHROMEOS) && defined(USE_X11)
1027 // Create TouchTransformerController before DisplayController::InitDisplays() 1025 // Create TouchTransformerController before DisplayController::InitDisplays()
1028 // since TouchTransformerController listens on 1026 // since TouchTransformerController listens on
1029 // DisplayController::Observer::OnDisplaysInitialized(). 1027 // DisplayController::Observer::OnDisplaysInitialized().
1030 touch_transformer_controller_.reset(new TouchTransformerController()); 1028 touch_transformer_controller_.reset(new TouchTransformerController());
1031 #endif // defined(OS_CHROMEOS) && defined(USE_X11) 1029 #endif // defined(OS_CHROMEOS)
1032 1030
1033 display_controller_->InitDisplays(); 1031 display_controller_->InitDisplays();
1034 1032
1035 #if defined(OS_CHROMEOS) 1033 #if defined(OS_CHROMEOS)
1036 // Needs to be created after InitDisplays() since it may cause the virtual 1034 // Needs to be created after InitDisplays() since it may cause the virtual
1037 // keyboard to be deployed. 1035 // keyboard to be deployed.
1038 virtual_keyboard_controller_.reset(new VirtualKeyboardController); 1036 virtual_keyboard_controller_.reset(new VirtualKeyboardController);
1039 #endif // defined(OS_CHROMEOS) 1037 #endif // defined(OS_CHROMEOS)
1040 1038
1041 // It needs to be created after RootWindowController has been created 1039 // It needs to be created after RootWindowController has been created
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
1165 //////////////////////////////////////////////////////////////////////////////// 1163 ////////////////////////////////////////////////////////////////////////////////
1166 // Shell, aura::client::ActivationChangeObserver implementation: 1164 // Shell, aura::client::ActivationChangeObserver implementation:
1167 1165
1168 void Shell::OnWindowActivated(aura::Window* gained_active, 1166 void Shell::OnWindowActivated(aura::Window* gained_active,
1169 aura::Window* lost_active) { 1167 aura::Window* lost_active) {
1170 if (gained_active) 1168 if (gained_active)
1171 target_root_window_ = gained_active->GetRootWindow(); 1169 target_root_window_ = gained_active->GetRootWindow();
1172 } 1170 }
1173 1171
1174 } // namespace ash 1172 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell.h ('k') | ash/touch/touch_transformer_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698