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

Side by Side Diff: ash/shell.cc

Issue 2887413004: chromeos: moves setting of touch state to a separate class (Closed)
Patch Set: feedback Created 3 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
« no previous file with comments | « no previous file | ash/touch/ash_touch_transform_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 #include <utility> 9 #include <utility>
10 10
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 #include "ui/aura/mus/user_activity_forwarder.h" 146 #include "ui/aura/mus/user_activity_forwarder.h"
147 #include "ui/aura/mus/window_tree_client.h" 147 #include "ui/aura/mus/window_tree_client.h"
148 #include "ui/aura/window.h" 148 #include "ui/aura/window.h"
149 #include "ui/aura/window_event_dispatcher.h" 149 #include "ui/aura/window_event_dispatcher.h"
150 #include "ui/base/ui_base_switches.h" 150 #include "ui/base/ui_base_switches.h"
151 #include "ui/base/user_activity/user_activity_detector.h" 151 #include "ui/base/user_activity/user_activity_detector.h"
152 #include "ui/chromeos/user_activity_power_manager_notifier.h" 152 #include "ui/chromeos/user_activity_power_manager_notifier.h"
153 #include "ui/compositor/layer.h" 153 #include "ui/compositor/layer.h"
154 #include "ui/compositor/layer_animator.h" 154 #include "ui/compositor/layer_animator.h"
155 #include "ui/display/display.h" 155 #include "ui/display/display.h"
156 #include "ui/display/manager/chromeos/default_touch_transform_setter.h"
156 #include "ui/display/manager/chromeos/display_change_observer.h" 157 #include "ui/display/manager/chromeos/display_change_observer.h"
157 #include "ui/display/manager/chromeos/display_configurator.h" 158 #include "ui/display/manager/chromeos/display_configurator.h"
158 #include "ui/display/manager/display_manager.h" 159 #include "ui/display/manager/display_manager.h"
159 #include "ui/display/screen.h" 160 #include "ui/display/screen.h"
160 #include "ui/display/types/native_display_delegate.h" 161 #include "ui/display/types/native_display_delegate.h"
161 #include "ui/events/event_target_iterator.h" 162 #include "ui/events/event_target_iterator.h"
162 #include "ui/gfx/geometry/insets.h" 163 #include "ui/gfx/geometry/insets.h"
163 #include "ui/gfx/image/image_skia.h" 164 #include "ui/gfx/image/image_skia.h"
164 #include "ui/keyboard/keyboard_controller.h" 165 #include "ui/keyboard/keyboard_controller.h"
165 #include "ui/keyboard/keyboard_switches.h" 166 #include "ui/keyboard/keyboard_switches.h"
(...skipping 886 matching lines...) Expand 10 before | Expand all | Expand 10 after
1052 // May trigger initialization of the Bluetooth adapter. 1053 // May trigger initialization of the Bluetooth adapter.
1053 tray_bluetooth_helper_->Initialize(); 1054 tray_bluetooth_helper_->Initialize();
1054 1055
1055 // Create AshTouchTransformController before 1056 // Create AshTouchTransformController before
1056 // WindowTreeHostManager::InitDisplays() 1057 // WindowTreeHostManager::InitDisplays()
1057 // since AshTouchTransformController listens on 1058 // since AshTouchTransformController listens on
1058 // WindowTreeHostManager::Observer::OnDisplaysInitialized(). 1059 // WindowTreeHostManager::Observer::OnDisplaysInitialized().
1059 // TODO(sky): needs to to work for mus too. 1060 // TODO(sky): needs to to work for mus too.
1060 if (config == Config::CLASSIC) { 1061 if (config == Config::CLASSIC) {
1061 touch_transformer_controller_.reset(new AshTouchTransformController( 1062 touch_transformer_controller_.reset(new AshTouchTransformController(
1062 display_configurator_.get(), display_manager_.get())); 1063 display_configurator_.get(), display_manager_.get(),
1064 base::MakeUnique<display::DefaultTouchTransformSetter>()));
1063 } 1065 }
1064 1066
1065 keyboard_ui_ = shell_port_->CreateKeyboardUI(); 1067 keyboard_ui_ = shell_port_->CreateKeyboardUI();
1066 1068
1067 shell_port_->InitHosts(init_params); 1069 shell_port_->InitHosts(init_params);
1068 1070
1069 // Needs to be created after InitDisplays() since it may cause the virtual 1071 // Needs to be created after InitDisplays() since it may cause the virtual
1070 // keyboard to be deployed. 1072 // keyboard to be deployed.
1071 if (config != Config::MASH) 1073 if (config != Config::MASH)
1072 virtual_keyboard_controller_.reset(new VirtualKeyboardController); 1074 virtual_keyboard_controller_.reset(new VirtualKeyboardController);
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
1264 void Shell::OnPrefServiceInitialized( 1266 void Shell::OnPrefServiceInitialized(
1265 std::unique_ptr<::PrefService> pref_service) { 1267 std::unique_ptr<::PrefService> pref_service) {
1266 if (!instance_) 1268 if (!instance_)
1267 return; 1269 return;
1268 // |pref_service_| is null if can't connect to Chrome (as happens when 1270 // |pref_service_| is null if can't connect to Chrome (as happens when
1269 // running mash outside of chrome --mash and chrome isn't built). 1271 // running mash outside of chrome --mash and chrome isn't built).
1270 pref_service_ = std::move(pref_service); 1272 pref_service_ = std::move(pref_service);
1271 } 1273 }
1272 1274
1273 } // namespace ash 1275 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/touch/ash_touch_transform_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698