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

Side by Side Diff: components/mus/public/cpp/lib/window.cc

Issue 1818333002: Reland: mus: Enable system modal windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased 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 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 "components/mus/public/cpp/window.h" 5 #include "components/mus/public/cpp/window.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 if (connection_) 336 if (connection_)
337 CHECK_EQ(child->connection_, connection_); 337 CHECK_EQ(child->connection_, connection_);
338 for (const Window* p = child->parent(); p; p = p->parent()) { 338 for (const Window* p = child->parent(); p; p = p->parent()) {
339 if (p == this) 339 if (p == this)
340 return true; 340 return true;
341 } 341 }
342 return false; 342 return false;
343 } 343 }
344 344
345 void Window::AddTransientWindow(Window* transient_window) { 345 void Window::AddTransientWindow(Window* transient_window) {
346 // A system modal window cannot become a transient child.
347 DCHECK(!transient_window->is_modal() || transient_window->transient_parent());
348
346 if (connection_) 349 if (connection_)
347 CHECK_EQ(transient_window->connection(), connection_); 350 CHECK_EQ(transient_window->connection(), connection_);
348 LocalAddTransientWindow(transient_window); 351 LocalAddTransientWindow(transient_window);
349 if (connection_) 352 if (connection_)
350 tree_client()->AddTransientWindow(this, transient_window->server_id()); 353 tree_client()->AddTransientWindow(this, transient_window->server_id());
351 } 354 }
352 355
353 void Window::RemoveTransientWindow(Window* transient_window) { 356 void Window::RemoveTransientWindow(Window* transient_window) {
354 if (connection_) 357 if (connection_)
355 CHECK_EQ(transient_window->connection(), connection_); 358 CHECK_EQ(transient_window->connection(), connection_);
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
867 notifier->NotifyWindowReordered(); 870 notifier->NotifyWindowReordered();
868 871
869 return true; 872 return true;
870 } 873 }
871 874
872 // static 875 // static
873 Window** Window::GetStackingTarget(Window* window) { 876 Window** Window::GetStackingTarget(Window* window) {
874 return &window->stacking_target_; 877 return &window->stacking_target_;
875 } 878 }
876 } // namespace mus 879 } // namespace mus
OLDNEW
« no previous file with comments | « no previous file | components/mus/ws/event_dispatcher.h » ('j') | components/mus/ws/event_dispatcher.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698