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

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

Issue 2033843003: Makes ash/mus use RootWindowControllerCommon (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_mash_wm
Patch Set: merge fail 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 | « ash/mus/background_layout.cc ('k') | ash/mus/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 "ash/mus/bridge/wm_shell_mus.h" 5 #include "ash/mus/bridge/wm_shell_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_activation_observer.h" 9 #include "ash/common/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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 177
178 void WmShellMus::RemoveOverviewModeObserver(WmOverviewModeObserver* observer) { 178 void WmShellMus::RemoveOverviewModeObserver(WmOverviewModeObserver* observer) {
179 NOTIMPLEMENTED(); 179 NOTIMPLEMENTED();
180 } 180 }
181 181
182 // static 182 // static
183 bool WmShellMus::IsActivationParent(::mus::Window* window) { 183 bool WmShellMus::IsActivationParent(::mus::Window* window) {
184 if (!window) 184 if (!window)
185 return false; 185 return false;
186 186
187 for (size_t i = 0; i < kNumActivationContainers; ++i) { 187 const int shell_window_id = WmWindowMus::Get(window)->GetShellWindowId();
188 if (window->local_id() == static_cast<int>(kActivationContainers[i])) 188 for (size_t i = 0; i < kNumActivatableShellWindowIds; ++i) {
189 if (shell_window_id == kActivatableShellWindowIds[i])
189 return true; 190 return true;
190 } 191 }
191 return false; 192 return false;
192 } 193 }
193 194
194 void WmShellMus::RemoveClientObserver() { 195 void WmShellMus::RemoveClientObserver() {
195 if (!client_) 196 if (!client_)
196 return; 197 return;
197 198
198 client_->RemoveObserver(this); 199 client_->RemoveObserver(this);
(...skipping 12 matching lines...) Expand all
211 OnWindowActivated(gained_active, lost_active)); 212 OnWindowActivated(gained_active, lost_active));
212 } 213 }
213 214
214 void WmShellMus::OnWillDestroyClient(::mus::WindowTreeClient* client) { 215 void WmShellMus::OnWillDestroyClient(::mus::WindowTreeClient* client) {
215 DCHECK_EQ(client, client_); 216 DCHECK_EQ(client, client_);
216 RemoveClientObserver(); 217 RemoveClientObserver();
217 } 218 }
218 219
219 } // namespace mus 220 } // namespace mus
220 } // namespace ash 221 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/background_layout.cc ('k') | ash/mus/bridge/wm_window_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698