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

Side by Side Diff: components/mus/ws/display.cc

Issue 1801963002: Change primordial pipes to ShellClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/ws/display.h" 5 #include "components/mus/ws/display.h"
6 6
7 #include "base/debug/debugger.h" 7 #include "base/debug/debugger.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "components/mus/common/types.h" 9 #include "components/mus/common/types.h"
10 #include "components/mus/ws/connection_manager.h" 10 #include "components/mus/ws/connection_manager.h"
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 for (auto& pair : window_manager_state_map_) 319 for (auto& pair : window_manager_state_map_)
320 pair.second->root()->SetBounds(wm_bounds); 320 pair.second->root()->SetBounds(wm_bounds);
321 } 321 }
322 // TODO(sky): if bounds changed, then need to update 322 // TODO(sky): if bounds changed, then need to update
323 // Display/WindowManagerState appropriately (e.g. notify observers). 323 // Display/WindowManagerState appropriately (e.g. notify observers).
324 connection_manager_->ProcessViewportMetricsChanged(this, old_metrics, 324 connection_manager_->ProcessViewportMetricsChanged(this, old_metrics,
325 new_metrics); 325 new_metrics);
326 } 326 }
327 327
328 void Display::OnTopLevelSurfaceChanged(cc::SurfaceId surface_id) { 328 void Display::OnTopLevelSurfaceChanged(cc::SurfaceId surface_id) {
329 DCHECK(!root_); 329 // This should only be called twice: once before we've created root_, and once
330 // This should only be called once, and before we've created root_. 330 // during shutdown, when |surface_id| will be null.
331 DCHECK(!root_ || surface_id.is_null());
331 top_level_surface_id_ = surface_id; 332 top_level_surface_id_ = surface_id;
332 } 333 }
333 334
334 void Display::OnCompositorFrameDrawn() { 335 void Display::OnCompositorFrameDrawn() {
335 std::set<ServerWindow*> windows; 336 std::set<ServerWindow*> windows;
336 windows.swap(windows_needing_frame_destruction_); 337 windows.swap(windows_needing_frame_destruction_);
337 for (ServerWindow* window : windows) { 338 for (ServerWindow* window : windows) {
338 window->RemoveObserver(this); 339 window->RemoveObserver(this);
339 window->DestroySurfacesScheduledForDestruction(); 340 window->DestroySurfacesScheduledForDestruction();
340 } 341 }
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 DCHECK_EQ(0u, window_manager_state_map_.count(id)); 479 DCHECK_EQ(0u, window_manager_state_map_.count(id));
479 } 480 }
480 481
481 void Display::OnWindowManagerFactorySet(WindowManagerFactoryService* service) { 482 void Display::OnWindowManagerFactorySet(WindowManagerFactoryService* service) {
482 if (!binding_) 483 if (!binding_)
483 CreateWindowManagerStateFromService(service); 484 CreateWindowManagerStateFromService(service);
484 } 485 }
485 486
486 } // namespace ws 487 } // namespace ws
487 } // namespace mus 488 } // namespace mus
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698