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

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

Issue 1949603002: Revert of mus: Enable system modal windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | components/mus/public/interfaces/window_tree.mojom » ('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 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
349 if (connection_) 346 if (connection_)
350 CHECK_EQ(transient_window->connection(), connection_); 347 CHECK_EQ(transient_window->connection(), connection_);
351 LocalAddTransientWindow(transient_window); 348 LocalAddTransientWindow(transient_window);
352 if (connection_) 349 if (connection_)
353 tree_client()->AddTransientWindow(this, transient_window->server_id()); 350 tree_client()->AddTransientWindow(this, transient_window->server_id());
354 } 351 }
355 352
356 void Window::RemoveTransientWindow(Window* transient_window) { 353 void Window::RemoveTransientWindow(Window* transient_window) {
357 if (connection_) 354 if (connection_)
358 CHECK_EQ(transient_window->connection(), connection_); 355 CHECK_EQ(transient_window->connection(), connection_);
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 notifier->NotifyWindowReordered(); 867 notifier->NotifyWindowReordered();
871 868
872 return true; 869 return true;
873 } 870 }
874 871
875 // static 872 // static
876 Window** Window::GetStackingTarget(Window* window) { 873 Window** Window::GetStackingTarget(Window* window) {
877 return &window->stacking_target_; 874 return &window->stacking_target_;
878 } 875 }
879 } // namespace mus 876 } // namespace mus
OLDNEW
« no previous file with comments | « no previous file | components/mus/public/interfaces/window_tree.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698