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

Side by Side Diff: services/ui/ws/server_window.cc

Issue 2710023007: Make WindowTree::SetModal() take the type. (Closed)
Patch Set: more code. Created 3 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "services/ui/ws/server_window.h" 5 #include "services/ui/ws/server_window.h"
6 6
7 #include <inttypes.h> 7 #include <inttypes.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 // If |child| and its former transient parent share the same parent, |child| 269 // If |child| and its former transient parent share the same parent, |child|
270 // should be restacked properly so it is not among transient children of its 270 // should be restacked properly so it is not among transient children of its
271 // former parent, anymore. 271 // former parent, anymore.
272 if (parent() == child->parent()) 272 if (parent() == child->parent())
273 RestackTransientDescendants(this, &GetStackingTarget, &ReorderImpl); 273 RestackTransientDescendants(this, &GetStackingTarget, &ReorderImpl);
274 274
275 for (auto& observer : observers_) 275 for (auto& observer : observers_)
276 observer.OnTransientWindowRemoved(this, child); 276 observer.OnTransientWindowRemoved(this, child);
277 } 277 }
278 278
279 void ServerWindow::SetModal() { 279 void ServerWindow::SetModal(bool is_modal) {
280 is_modal_ = true; 280 is_modal_ = is_modal;
281 } 281 }
282 282
283 bool ServerWindow::Contains(const ServerWindow* window) const { 283 bool ServerWindow::Contains(const ServerWindow* window) const {
284 for (const ServerWindow* parent = window; parent; parent = parent->parent_) { 284 for (const ServerWindow* parent = window; parent; parent = parent->parent_) {
285 if (parent == this) 285 if (parent == this)
286 return true; 286 return true;
287 } 287 }
288 return false; 288 return false;
289 } 289 }
290 290
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 window->OnStackingChanged(); 481 window->OnStackingChanged();
482 } 482 }
483 483
484 // static 484 // static
485 ServerWindow** ServerWindow::GetStackingTarget(ServerWindow* window) { 485 ServerWindow** ServerWindow::GetStackingTarget(ServerWindow* window) {
486 return &window->stacking_target_; 486 return &window->stacking_target_;
487 } 487 }
488 488
489 } // namespace ws 489 } // namespace ws
490 } // namespace ui 490 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698