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

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

Issue 1848653006: Random wm frame painting fixes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: override 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
« no previous file with comments | « no previous file | components/mus/public/cpp/window.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 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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 return; 309 return;
310 Reorder(parent_->children_.back(), mojom::OrderDirection::ABOVE); 310 Reorder(parent_->children_.back(), mojom::OrderDirection::ABOVE);
311 } 311 }
312 312
313 void Window::MoveToBack() { 313 void Window::MoveToBack() {
314 if (!parent_ || parent_->children_.front() == this) 314 if (!parent_ || parent_->children_.front() == this)
315 return; 315 return;
316 Reorder(parent_->children_.front(), mojom::OrderDirection::BELOW); 316 Reorder(parent_->children_.front(), mojom::OrderDirection::BELOW);
317 } 317 }
318 318
319 bool Window::Contains(Window* child) const { 319 bool Window::Contains(const Window* child) const {
320 if (!child) 320 if (!child)
321 return false; 321 return false;
322 if (child == this) 322 if (child == this)
323 return true; 323 return true;
324 if (connection_) 324 if (connection_)
325 CHECK_EQ(child->connection(), connection_); 325 CHECK_EQ(child->connection_, connection_);
326 for (Window* p = child->parent(); p; p = p->parent()) { 326 for (const Window* p = child->parent(); p; p = p->parent()) {
327 if (p == this) 327 if (p == this)
328 return true; 328 return true;
329 } 329 }
330 return false; 330 return false;
331 } 331 }
332 332
333 void Window::AddTransientWindow(Window* transient_window) { 333 void Window::AddTransientWindow(Window* transient_window) {
334 if (connection_) 334 if (connection_)
335 CHECK_EQ(transient_window->connection(), connection_); 335 CHECK_EQ(transient_window->connection(), connection_);
336 LocalAddTransientWindow(transient_window); 336 LocalAddTransientWindow(transient_window);
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 notifier->NotifyWindowReordered(); 838 notifier->NotifyWindowReordered();
839 839
840 return true; 840 return true;
841 } 841 }
842 842
843 // static 843 // static
844 Window** Window::GetStackingTarget(Window* window) { 844 Window** Window::GetStackingTarget(Window* window) {
845 return &window->stacking_target_; 845 return &window->stacking_target_;
846 } 846 }
847 } // namespace mus 847 } // namespace mus
OLDNEW
« no previous file with comments | « no previous file | components/mus/public/cpp/window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698