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

Side by Side Diff: services/ui/ws/display_manager.cc

Issue 2627623003: Add full touch support to mus. (Closed)
Patch Set: Created 3 years, 11 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 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/ws/display_manager.h" 5 #include "services/ui/ws/display_manager.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 173
174 void DisplayManager::OnDisplayAdded(int64_t id, 174 void DisplayManager::OnDisplayAdded(int64_t id,
175 const display::ViewportMetrics& metrics) { 175 const display::ViewportMetrics& metrics) {
176 TRACE_EVENT1("mus-ws", "OnDisplayAdded", "id", id); 176 TRACE_EVENT1("mus-ws", "OnDisplayAdded", "id", id);
177 PlatformDisplayInitParams params; 177 PlatformDisplayInitParams params;
178 params.display_id = id; 178 params.display_id = id;
179 params.metrics = metrics; 179 params.metrics = metrics;
180 180
181 ws::Display* display = new ws::Display(window_server_); 181 ws::Display* display = new ws::Display(window_server_);
182 display->Init(params, nullptr); 182 display->Init(params, nullptr);
183
184 window_server_->delegate()->UpdateTouchTransforms();
185 } 183 }
186 184
187 void DisplayManager::OnDisplayRemoved(int64_t id) { 185 void DisplayManager::OnDisplayRemoved(int64_t id) {
188 TRACE_EVENT1("mus-ws", "OnDisplayRemoved", "id", id); 186 TRACE_EVENT1("mus-ws", "OnDisplayRemoved", "id", id);
189 Display* display = GetDisplayById(id); 187 Display* display = GetDisplayById(id);
190 if (display) 188 if (display)
191 DestroyDisplay(display); 189 DestroyDisplay(display);
192 } 190 }
193 191
194 void DisplayManager::OnDisplayModified( 192 void DisplayManager::OnDisplayModified(
(...skipping 24 matching lines...) Expand all
219 void DisplayManager::OnPrimaryDisplayChanged(int64_t primary_display_id) { 217 void DisplayManager::OnPrimaryDisplayChanged(int64_t primary_display_id) {
220 // TODO(kylechar): Send IPCs to WM clients first. 218 // TODO(kylechar): Send IPCs to WM clients first.
221 219
222 // Send IPCs to any DisplayManagerObservers. 220 // Send IPCs to any DisplayManagerObservers.
223 for (const auto& pair : user_display_managers_) 221 for (const auto& pair : user_display_managers_)
224 pair.second->OnPrimaryDisplayChanged(primary_display_id); 222 pair.second->OnPrimaryDisplayChanged(primary_display_id);
225 } 223 }
226 224
227 } // namespace ws 225 } // namespace ws
228 } // namespace ui 226 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698