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

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

Issue 2491493004: Fix root ServerWindow size. (Closed)
Patch Set: Fixes. 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/ws/display.cc ('k') | services/ui/ws/platform_display.cc » ('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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 return; 202 return;
203 203
204 // Send IPCs to WM clients first with new display information. 204 // Send IPCs to WM clients first with new display information.
205 std::vector<WindowManagerWindowTreeFactory*> factories = 205 std::vector<WindowManagerWindowTreeFactory*> factories =
206 window_server_->window_manager_window_tree_factory_set()->GetFactories(); 206 window_server_->window_manager_window_tree_factory_set()->GetFactories();
207 for (WindowManagerWindowTreeFactory* factory : factories) { 207 for (WindowManagerWindowTreeFactory* factory : factories) {
208 if (factory->window_tree()) 208 if (factory->window_tree())
209 factory->window_tree()->OnWmDisplayModified(display->ToDisplay()); 209 factory->window_tree()->OnWmDisplayModified(display->ToDisplay());
210 } 210 }
211 211
212 // Change the root ServerWindow size after sending IPC to WM.
212 display->OnViewportMetricsChanged(metrics); 213 display->OnViewportMetricsChanged(metrics);
213 OnDisplayUpdate(display); 214 OnDisplayUpdate(display);
214 } 215 }
215 216
216 void DisplayManager::OnPrimaryDisplayChanged(int64_t primary_display_id) { 217 void DisplayManager::OnPrimaryDisplayChanged(int64_t primary_display_id) {
217 // TODO(kylechar): Send IPCs to WM clients first. 218 // TODO(kylechar): Send IPCs to WM clients first.
218 219
219 // Send IPCs to any DisplayManagerObservers. 220 // Send IPCs to any DisplayManagerObservers.
220 for (const auto& pair : user_display_managers_) 221 for (const auto& pair : user_display_managers_)
221 pair.second->OnPrimaryDisplayChanged(primary_display_id); 222 pair.second->OnPrimaryDisplayChanged(primary_display_id);
222 } 223 }
223 224
224 } // namespace ws 225 } // namespace ws
225 } // namespace ui 226 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/display.cc ('k') | services/ui/ws/platform_display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698