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

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

Issue 1882423004: Move shell service to toplevel shell namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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/display_binding.h" 10 #include "components/mus/ws/display_binding.h"
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 if (!init_called_ || !root_) 248 if (!init_called_ || !root_)
249 return; 249 return;
250 250
251 display_manager()->OnDisplayAcceleratedWidgetAvailable(this); 251 display_manager()->OnDisplayAcceleratedWidgetAvailable(this);
252 if (binding_) { 252 if (binding_) {
253 scoped_ptr<WindowManagerState> wms_ptr(new WindowManagerState( 253 scoped_ptr<WindowManagerState> wms_ptr(new WindowManagerState(
254 this, platform_display_.get(), top_level_surface_id_)); 254 this, platform_display_.get(), top_level_surface_id_));
255 WindowManagerState* wms = wms_ptr.get(); 255 WindowManagerState* wms = wms_ptr.get();
256 // For this case we never create additional WindowManagerStates, so any 256 // For this case we never create additional WindowManagerStates, so any
257 // id works. 257 // id works.
258 window_manager_state_map_[mojo::shell::mojom::kRootUserID] = 258 window_manager_state_map_[shell::mojom::kRootUserID] = std::move(wms_ptr);
259 std::move(wms_ptr);
260 wms->tree_ = binding_->CreateWindowTree(wms->root()); 259 wms->tree_ = binding_->CreateWindowTree(wms->root());
261 } else { 260 } else {
262 CreateWindowManagerStatesFromRegistry(); 261 CreateWindowManagerStatesFromRegistry();
263 } 262 }
264 } 263 }
265 264
266 void Display::CreateWindowManagerStatesFromRegistry() { 265 void Display::CreateWindowManagerStatesFromRegistry() {
267 std::vector<WindowManagerFactoryService*> services = 266 std::vector<WindowManagerFactoryService*> services =
268 window_server_->window_manager_factory_registry()->GetServices(); 267 window_server_->window_manager_factory_registry()->GetServices();
269 for (WindowManagerFactoryService* service : services) { 268 for (WindowManagerFactoryService* service : services) {
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 DCHECK_EQ(0u, window_manager_state_map_.count(id)); 481 DCHECK_EQ(0u, window_manager_state_map_.count(id));
483 } 482 }
484 483
485 void Display::OnWindowManagerFactorySet(WindowManagerFactoryService* service) { 484 void Display::OnWindowManagerFactorySet(WindowManagerFactoryService* service) {
486 if (!binding_) 485 if (!binding_)
487 CreateWindowManagerStateFromService(service); 486 CreateWindowManagerStateFromService(service);
488 } 487 }
489 488
490 } // namespace ws 489 } // namespace ws
491 } // namespace mus 490 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/public/cpp/window_tree_host_factory.h ('k') | components/mus/ws/platform_display.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698