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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/mus/mus_app.h ('k') | components/mus/ws/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/mus_app.cc
diff --git a/components/mus/mus_app.cc b/components/mus/mus_app.cc
index b18917b138c2f8018880c1d7a39f557b72ab3bd7..f2de0ac9bf2247fd4218be72f478247a5557d9b8 100644
--- a/components/mus/mus_app.cc
+++ b/components/mus/mus_app.cc
@@ -197,6 +197,12 @@ void MusApp::Initialize(shell::Connector* connector,
platform_screen_->Init();
window_server_.reset(
new ws::WindowServer(this, platform_display_init_params_.surfaces_state));
+
+ // DeviceDataManager must be initialized before TouchController. On non-Linux
+ // platforms there is no DeviceDataManager so don't create touch controller.
+ if (ui::DeviceDataManager::HasInstance())
+ touch_controller_.reset(
+ new ws::TouchController(window_server_->display_manager()));
}
bool MusApp::AcceptConnection(Connection* connection) {
@@ -332,6 +338,9 @@ void MusApp::OnCreatedPhysicalDisplay(int64_t id, const gfx::Rect& bounds) {
ws::Display* host_impl =
new ws::Display(window_server_.get(), platform_display_init_params_);
host_impl->Init(nullptr);
+
+ if (touch_controller_)
+ touch_controller_->UpdateTouchTransforms();
}
} // namespace mus
« 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