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

Side by Side Diff: ash/shell.cc

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

Powered by Google App Engine
This is Rietveld 408576698