OLD | NEW |
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/public/cpp/window.h" | 5 #include "services/ui/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 862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
873 } | 873 } |
874 | 874 |
875 // static | 875 // static |
876 void Window::ReorderWithoutNotification(Window* window, | 876 void Window::ReorderWithoutNotification(Window* window, |
877 Window* relative, | 877 Window* relative, |
878 mojom::OrderDirection direction) { | 878 mojom::OrderDirection direction) { |
879 ReorderImpl(window, relative, direction, nullptr); | 879 ReorderImpl(window, relative, direction, nullptr); |
880 } | 880 } |
881 | 881 |
882 // static | 882 // static |
883 // Returns true if the order actually changed. | |
884 bool Window::ReorderImpl(Window* window, | 883 bool Window::ReorderImpl(Window* window, |
885 Window* relative, | 884 Window* relative, |
886 mojom::OrderDirection direction, | 885 mojom::OrderDirection direction, |
887 OrderChangedNotifier* notifier) { | 886 OrderChangedNotifier* notifier) { |
888 DCHECK(relative); | 887 DCHECK(relative); |
889 DCHECK_NE(window, relative); | 888 DCHECK_NE(window, relative); |
890 DCHECK_EQ(window->parent(), relative->parent()); | 889 DCHECK_EQ(window->parent(), relative->parent()); |
891 DCHECK(window->parent()); | 890 DCHECK(window->parent()); |
892 | 891 |
893 if (!AdjustStackingForTransientWindows(&window, &relative, &direction, | 892 if (!AdjustStackingForTransientWindows(&window, &relative, &direction, |
(...skipping 29 matching lines...) Expand all Loading... |
923 notifier->NotifyWindowReordered(); | 922 notifier->NotifyWindowReordered(); |
924 | 923 |
925 return true; | 924 return true; |
926 } | 925 } |
927 | 926 |
928 // static | 927 // static |
929 Window** Window::GetStackingTarget(Window* window) { | 928 Window** Window::GetStackingTarget(Window* window) { |
930 return &window->stacking_target_; | 929 return &window->stacking_target_; |
931 } | 930 } |
932 } // namespace ui | 931 } // namespace ui |
OLD | NEW |