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

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

Issue 2470143006: Remove dependency on SurfaceManager in FrameGenerator (Closed)
Patch Set: Remove a couple of bad std::moves Created 4 years, 1 month 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 | « services/ui/surfaces/display_compositor.cc ('k') | services/ui/ws/frame_generator.h » ('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/ws/display_manager.h" 5 #include "services/ui/ws/display_manager.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/trace_event/trace_event.h" 8 #include "base/trace_event/trace_event.h"
9 #include "services/ui/display/platform_screen.h" 9 #include "services/ui/display/platform_screen.h"
10 #include "services/ui/ws/display.h" 10 #include "services/ui/ws/display.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 if (current_window_manager_state) 168 if (current_window_manager_state)
169 current_window_manager_state->Activate(mouse_location_on_screen); 169 current_window_manager_state->Activate(mouse_location_on_screen);
170 } 170 }
171 171
172 void DisplayManager::OnDisplayAdded(int64_t id, 172 void DisplayManager::OnDisplayAdded(int64_t id,
173 const display::ViewportMetrics& metrics) { 173 const display::ViewportMetrics& metrics) {
174 TRACE_EVENT1("mus-ws", "OnDisplayAdded", "id", id); 174 TRACE_EVENT1("mus-ws", "OnDisplayAdded", "id", id);
175 PlatformDisplayInitParams params; 175 PlatformDisplayInitParams params;
176 params.display_id = id; 176 params.display_id = id;
177 params.metrics = metrics; 177 params.metrics = metrics;
178 params.display_compositor = window_server_->GetDisplayCompositor();
179 178
180 ws::Display* display = new ws::Display(window_server_, params); 179 ws::Display* display = new ws::Display(window_server_, params);
181 display->Init(nullptr); 180 display->Init(nullptr);
182 181
183 window_server_->delegate()->UpdateTouchTransforms(); 182 window_server_->delegate()->UpdateTouchTransforms();
184 } 183 }
185 184
186 void DisplayManager::OnDisplayRemoved(int64_t id) { 185 void DisplayManager::OnDisplayRemoved(int64_t id) {
187 TRACE_EVENT1("mus-ws", "OnDisplayRemoved", "id", id); 186 TRACE_EVENT1("mus-ws", "OnDisplayRemoved", "id", id);
188 Display* display = GetDisplayById(id); 187 Display* display = GetDisplayById(id);
(...skipping 28 matching lines...) Expand all
217 void DisplayManager::OnPrimaryDisplayChanged(int64_t primary_display_id) { 216 void DisplayManager::OnPrimaryDisplayChanged(int64_t primary_display_id) {
218 // TODO(kylechar): Send IPCs to WM clients first. 217 // TODO(kylechar): Send IPCs to WM clients first.
219 218
220 // Send IPCs to any DisplayManagerObservers. 219 // Send IPCs to any DisplayManagerObservers.
221 for (const auto& pair : user_display_managers_) 220 for (const auto& pair : user_display_managers_)
222 pair.second->OnPrimaryDisplayChanged(primary_display_id); 221 pair.second->OnPrimaryDisplayChanged(primary_display_id);
223 } 222 }
224 223
225 } // namespace ws 224 } // namespace ws
226 } // namespace ui 225 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/surfaces/display_compositor.cc ('k') | services/ui/ws/frame_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698