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

Side by Side Diff: services/ui/display/screen_manager_ozone_internal.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 | « ash/touch/ash_touch_transform_controller.cc ('k') | ui/display/manager/BUILD.gn » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "services/ui/display/screen_manager_ozone_internal.h" 5 #include "services/ui/display/screen_manager_ozone_internal.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/memory/ptr_util.h" 11 #include "base/memory/ptr_util.h"
12 #include "base/threading/thread_task_runner_handle.h" 12 #include "base/threading/thread_task_runner_handle.h"
13 #include "chromeos/system/devicemode.h" 13 #include "chromeos/system/devicemode.h"
14 #include "mojo/public/cpp/bindings/strong_binding.h" 14 #include "mojo/public/cpp/bindings/strong_binding.h"
15 #include "services/service_manager/public/cpp/bind_source_info.h" 15 #include "services/service_manager/public/cpp/bind_source_info.h"
16 #include "services/service_manager/public/cpp/binder_registry.h" 16 #include "services/service_manager/public/cpp/binder_registry.h"
17 #include "services/ui/display/output_protection.h" 17 #include "services/ui/display/output_protection.h"
18 #include "third_party/skia/include/core/SkColor.h" 18 #include "third_party/skia/include/core/SkColor.h"
19 #include "ui/display/manager/chromeos/default_touch_transform_setter.h"
19 #include "ui/display/manager/chromeos/display_change_observer.h" 20 #include "ui/display/manager/chromeos/display_change_observer.h"
20 #include "ui/display/manager/chromeos/touch_transform_controller.h" 21 #include "ui/display/manager/chromeos/touch_transform_controller.h"
21 #include "ui/display/manager/display_layout_store.h" 22 #include "ui/display/manager/display_layout_store.h"
22 #include "ui/display/manager/display_manager_utilities.h" 23 #include "ui/display/manager/display_manager_utilities.h"
23 #include "ui/display/screen.h" 24 #include "ui/display/screen.h"
24 #include "ui/display/screen_base.h" 25 #include "ui/display/screen_base.h"
25 #include "ui/display/types/display_snapshot.h" 26 #include "ui/display/types/display_snapshot.h"
26 #include "ui/display/types/fake_display_controller.h" 27 #include "ui/display/types/fake_display_controller.h"
27 #include "ui/display/types/native_display_delegate.h" 28 #include "ui/display/types/native_display_delegate.h"
28 #include "ui/gfx/geometry/rect.h" 29 #include "ui/gfx/geometry/rect.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 display_configurator_.set_configure_display(true); 159 display_configurator_.set_configure_display(true);
159 display_configurator_.AddObserver(display_change_observer_.get()); 160 display_configurator_.AddObserver(display_change_observer_.get());
160 display_configurator_.set_state_controller(display_change_observer_.get()); 161 display_configurator_.set_state_controller(display_change_observer_.get());
161 display_configurator_.set_mirroring_controller(display_manager_.get()); 162 display_configurator_.set_mirroring_controller(display_manager_.get());
162 163
163 // Perform initial configuration. 164 // Perform initial configuration.
164 display_configurator_.Init(std::move(native_display_delegate_), false); 165 display_configurator_.Init(std::move(native_display_delegate_), false);
165 display_configurator_.ForceInitialConfigure(kChromeOsBootColor); 166 display_configurator_.ForceInitialConfigure(kChromeOsBootColor);
166 167
167 touch_transform_controller_ = base::MakeUnique<TouchTransformController>( 168 touch_transform_controller_ = base::MakeUnique<TouchTransformController>(
168 &display_configurator_, display_manager_.get()); 169 &display_configurator_, display_manager_.get(),
170 base::MakeUnique<display::DefaultTouchTransformSetter>());
169 } 171 }
170 172
171 void ScreenManagerOzoneInternal::RequestCloseDisplay(int64_t display_id) { 173 void ScreenManagerOzoneInternal::RequestCloseDisplay(int64_t display_id) {
172 if (!fake_display_controller_) 174 if (!fake_display_controller_)
173 return; 175 return;
174 176
175 // Tell the NDD to remove the display. ScreenManager will get an update 177 // Tell the NDD to remove the display. ScreenManager will get an update
176 // that the display configuration has changed and the display will be gone. 178 // that the display configuration has changed and the display will be gone.
177 fake_display_controller_->RemoveDisplay(display_id); 179 fake_display_controller_->RemoveDisplay(display_id);
178 } 180 }
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 std::move(request)); 377 std::move(request));
376 } 378 }
377 379
378 void ScreenManagerOzoneInternal::BindTestDisplayControllerRequest( 380 void ScreenManagerOzoneInternal::BindTestDisplayControllerRequest(
379 const service_manager::BindSourceInfo& source_info, 381 const service_manager::BindSourceInfo& source_info,
380 mojom::TestDisplayControllerRequest request) { 382 mojom::TestDisplayControllerRequest request) {
381 test_bindings_.AddBinding(this, std::move(request)); 383 test_bindings_.AddBinding(this, std::move(request));
382 } 384 }
383 385
384 } // namespace display 386 } // namespace display
OLDNEW
« no previous file with comments | « ash/touch/ash_touch_transform_controller.cc ('k') | ui/display/manager/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698