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

Side by Side Diff: mash/wm/bridge/wm_globals_mus.cc

Issue 2024993002: Makes RootWindowController window creation in terms of common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge 2 trunk Created 4 years, 6 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
« no previous file with comments | « mash/wm/bridge/wm_globals_mus.h ('k') | mash/wm/bridge/wm_window_mus.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 "mash/wm/bridge/wm_globals_mus.h" 5 #include "mash/wm/bridge/wm_globals_mus.h"
6 6
7 #include "ash/wm/common/window_resizer.h" 7 #include "ash/wm/common/window_resizer.h"
8 #include "ash/wm/common/wm_activation_observer.h" 8 #include "ash/wm/common/wm_activation_observer.h"
9 #include "ash/wm/common/wm_shell_window_ids.h" 9 #include "ash/wm/common/wm_shell_window_ids.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 int64_t id) { 64 int64_t id) {
65 for (WmRootWindowControllerMus* root_window_controller : 65 for (WmRootWindowControllerMus* root_window_controller :
66 root_window_controllers_) { 66 root_window_controllers_) {
67 if (root_window_controller->GetDisplay().id() == id) 67 if (root_window_controller->GetDisplay().id() == id)
68 return root_window_controller; 68 return root_window_controller;
69 } 69 }
70 NOTREACHED(); 70 NOTREACHED();
71 return nullptr; 71 return nullptr;
72 } 72 }
73 73
74 ash::wm::WmWindow* WmGlobalsMus::NewContainerWindow() {
75 return WmWindowMus::Get(client_->NewWindow());
76 }
77
74 ash::wm::WmWindow* WmGlobalsMus::GetFocusedWindow() { 78 ash::wm::WmWindow* WmGlobalsMus::GetFocusedWindow() {
75 return WmWindowMus::Get(client_->GetFocusedWindow()); 79 return WmWindowMus::Get(client_->GetFocusedWindow());
76 } 80 }
77 81
78 ash::wm::WmWindow* WmGlobalsMus::GetActiveWindow() { 82 ash::wm::WmWindow* WmGlobalsMus::GetActiveWindow() {
79 return GetToplevelAncestor(client_->GetFocusedWindow()); 83 return GetToplevelAncestor(client_->GetFocusedWindow());
80 } 84 }
81 85
82 ash::wm::WmWindow* WmGlobalsMus::GetPrimaryRootWindow() { 86 ash::wm::WmWindow* WmGlobalsMus::GetPrimaryRootWindow() {
83 return root_window_controllers_[0]->GetWindow(); 87 return root_window_controllers_[0]->GetWindow();
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 } 219 }
216 220
217 void WmGlobalsMus::OnWillDestroyClient( 221 void WmGlobalsMus::OnWillDestroyClient(
218 mus::WindowTreeClient* client) { 222 mus::WindowTreeClient* client) {
219 DCHECK_EQ(client, client_); 223 DCHECK_EQ(client, client_);
220 RemoveClientObserver(); 224 RemoveClientObserver();
221 } 225 }
222 226
223 } // namespace wm 227 } // namespace wm
224 } // namespace mash 228 } // namespace mash
OLDNEW
« no previous file with comments | « mash/wm/bridge/wm_globals_mus.h ('k') | mash/wm/bridge/wm_window_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698