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

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

Issue 1580193002: mus: Do not notify clients when the roots are reordered. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 11 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/ws/window_tree_impl.cc » ('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 760 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 771
772 // static 772 // static
773 // Returns true if the order actually changed. 773 // Returns true if the order actually changed.
774 bool Window::ReorderImpl(Window* window, 774 bool Window::ReorderImpl(Window* window,
775 Window* relative, 775 Window* relative,
776 mojom::OrderDirection direction, 776 mojom::OrderDirection direction,
777 OrderChangedNotifier* notifier) { 777 OrderChangedNotifier* notifier) {
778 DCHECK(relative); 778 DCHECK(relative);
779 DCHECK_NE(window, relative); 779 DCHECK_NE(window, relative);
780 DCHECK_EQ(window->parent(), relative->parent()); 780 DCHECK_EQ(window->parent(), relative->parent());
781 DCHECK(window->parent());
781 782
782 if (!AdjustStackingForTransientWindows(&window, &relative, &direction, 783 if (!AdjustStackingForTransientWindows(&window, &relative, &direction,
783 window->stacking_target_)) 784 window->stacking_target_))
784 return false; 785 return false;
785 786
786 const size_t child_i = std::find(window->parent_->children_.begin(), 787 const size_t child_i = std::find(window->parent_->children_.begin(),
787 window->parent_->children_.end(), window) - 788 window->parent_->children_.end(), window) -
788 window->parent_->children_.begin(); 789 window->parent_->children_.begin();
789 const size_t target_i = 790 const size_t target_i =
790 std::find(window->parent_->children_.begin(), 791 std::find(window->parent_->children_.begin(),
(...skipping 21 matching lines...) Expand all
812 notifier->NotifyWindowReordered(); 813 notifier->NotifyWindowReordered();
813 814
814 return true; 815 return true;
815 } 816 }
816 817
817 // static 818 // static
818 Window** Window::GetStackingTarget(Window* window) { 819 Window** Window::GetStackingTarget(Window* window) {
819 return &window->stacking_target_; 820 return &window->stacking_target_;
820 } 821 }
821 } // namespace mus 822 } // namespace mus
OLDNEW
« no previous file with comments | « no previous file | components/mus/ws/window_tree_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698