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

Side by Side Diff: ash/mus/bridge/wm_globals_mus.cc

Issue 2033843003: Makes ash/mus use RootWindowControllerCommon (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_mash_wm
Patch Set: git cl add 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
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 "ash/mus/bridge/wm_globals_mus.h" 5 #include "ash/mus/bridge/wm_globals_mus.h"
6 6
7 #include "ash/common/shell_window_ids.h" 7 #include "ash/common/shell_window_ids.h"
8 #include "ash/common/wm/window_resizer.h" 8 #include "ash/common/wm/window_resizer.h"
9 #include "ash/common/wm/wm_activation_observer.h" 9 #include "ash/common/wm/wm_activation_observer.h"
10 #include "ash/mus/bridge/wm_root_window_controller_mus.h" 10 #include "ash/mus/bridge/wm_root_window_controller_mus.h"
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 void WmGlobalsMus::RemoveOverviewModeObserver( 180 void WmGlobalsMus::RemoveOverviewModeObserver(
181 wm::WmOverviewModeObserver* observer) { 181 wm::WmOverviewModeObserver* observer) {
182 NOTIMPLEMENTED(); 182 NOTIMPLEMENTED();
183 } 183 }
184 184
185 // static 185 // static
186 bool WmGlobalsMus::IsActivationParent(::mus::Window* window) { 186 bool WmGlobalsMus::IsActivationParent(::mus::Window* window) {
187 if (!window) 187 if (!window)
188 return false; 188 return false;
189 189
190 for (size_t i = 0; i < kNumActivationContainers; ++i) { 190 const int shell_window_id = WmWindowMus::Get(window)->GetShellWindowId();
191 if (window->local_id() == static_cast<int>(kActivationContainers[i])) 191 for (size_t i = 0; i < kNumActivatableShellWindowIds; ++i) {
192 if (shell_window_id == kActivatableShellWindowIds[i])
192 return true; 193 return true;
193 } 194 }
194 return false; 195 return false;
195 } 196 }
196 197
197 void WmGlobalsMus::RemoveClientObserver() { 198 void WmGlobalsMus::RemoveClientObserver() {
198 if (!client_) 199 if (!client_)
199 return; 200 return;
200 201
201 client_->RemoveObserver(this); 202 client_->RemoveObserver(this);
(...skipping 12 matching lines...) Expand all
214 OnWindowActivated(gained_active, lost_active)); 215 OnWindowActivated(gained_active, lost_active));
215 } 216 }
216 217
217 void WmGlobalsMus::OnWillDestroyClient(::mus::WindowTreeClient* client) { 218 void WmGlobalsMus::OnWillDestroyClient(::mus::WindowTreeClient* client) {
218 DCHECK_EQ(client, client_); 219 DCHECK_EQ(client, client_);
219 RemoveClientObserver(); 220 RemoveClientObserver();
220 } 221 }
221 222
222 } // namespace mus 223 } // namespace mus
223 } // namespace ash 224 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698