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

Side by Side Diff: components/mus/mus_app.cc

Issue 2081253002: Implement rudimentary touchscreen support in mus. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing pure virtual. Created 4 years, 6 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 | « components/mus/mus_app.h ('k') | components/mus/ws/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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/mus/mus_app.h" 5 #include "components/mus/mus_app.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 } else { 190 } else {
191 // TODO(rjkroege): It is possible that we might want to generalize the 191 // TODO(rjkroege): It is possible that we might want to generalize the
192 // GpuState object. 192 // GpuState object.
193 platform_display_init_params_.gpu_state = new GpuState(); 193 platform_display_init_params_.gpu_state = new GpuState();
194 } 194 }
195 195
196 // Gpu must be running before the PlatformScreen can be initialized. 196 // Gpu must be running before the PlatformScreen can be initialized.
197 platform_screen_->Init(); 197 platform_screen_->Init();
198 window_server_.reset( 198 window_server_.reset(
199 new ws::WindowServer(this, platform_display_init_params_.surfaces_state)); 199 new ws::WindowServer(this, platform_display_init_params_.surfaces_state));
200
201 // DeviceDataManager must be initialized before TouchController. On non-Linux
202 // platforms there is no DeviceDataManager so don't create touch controller.
203 if (ui::DeviceDataManager::HasInstance())
204 touch_controller_.reset(
205 new ws::TouchController(window_server_->display_manager()));
200 } 206 }
201 207
202 bool MusApp::AcceptConnection(Connection* connection) { 208 bool MusApp::AcceptConnection(Connection* connection) {
203 connection->AddInterface<mojom::Clipboard>(this); 209 connection->AddInterface<mojom::Clipboard>(this);
204 connection->AddInterface<mojom::DisplayManager>(this); 210 connection->AddInterface<mojom::DisplayManager>(this);
205 connection->AddInterface<mojom::UserAccessManager>(this); 211 connection->AddInterface<mojom::UserAccessManager>(this);
206 connection->AddInterface<WindowTreeHostFactory>(this); 212 connection->AddInterface<WindowTreeHostFactory>(this);
207 connection->AddInterface<mojom::WindowManagerWindowTreeFactory>(this); 213 connection->AddInterface<mojom::WindowManagerWindowTreeFactory>(this);
208 connection->AddInterface<mojom::WindowTreeFactory>(this); 214 connection->AddInterface<mojom::WindowTreeFactory>(this);
209 if (test_config_) 215 if (test_config_)
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 } 331 }
326 332
327 void MusApp::OnCreatedPhysicalDisplay(int64_t id, const gfx::Rect& bounds) { 333 void MusApp::OnCreatedPhysicalDisplay(int64_t id, const gfx::Rect& bounds) {
328 platform_display_init_params_.display_bounds = bounds; 334 platform_display_init_params_.display_bounds = bounds;
329 platform_display_init_params_.display_id = id; 335 platform_display_init_params_.display_id = id;
330 336
331 // Display manages its own lifetime. 337 // Display manages its own lifetime.
332 ws::Display* host_impl = 338 ws::Display* host_impl =
333 new ws::Display(window_server_.get(), platform_display_init_params_); 339 new ws::Display(window_server_.get(), platform_display_init_params_);
334 host_impl->Init(nullptr); 340 host_impl->Init(nullptr);
341
342 if (touch_controller_)
343 touch_controller_->UpdateTouchTransforms();
335 } 344 }
336 345
337 } // namespace mus 346 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/mus_app.h ('k') | components/mus/ws/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698