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

Side by Side Diff: ui/views/corewm/transient_window_stacking_client.cc

Issue 139623002: Tweaks to get views compiling with mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mismatch Created 6 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 | « ui/native_theme/native_theme_android.cc ('k') | ui/views/layout/grid_layout.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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "ui/views/corewm/transient_window_stacking_client.h" 5 #include "ui/views/corewm/transient_window_stacking_client.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ui/views/corewm/transient_window_manager.h" 9 #include "ui/views/corewm/transient_window_manager.h"
10 #include "ui/views/corewm/window_util.h" 10 #include "ui/views/corewm/window_util.h"
(...skipping 25 matching lines...) Expand all
36 DCHECK(*window1); 36 DCHECK(*window1);
37 DCHECK(*window2); 37 DCHECK(*window2);
38 // Assemble chains of ancestors of both windows. 38 // Assemble chains of ancestors of both windows.
39 Window::Windows ancestors1; 39 Window::Windows ancestors1;
40 Window::Windows ancestors2; 40 Window::Windows ancestors2;
41 if (!GetAllTransientAncestors(*window1, &ancestors1) || 41 if (!GetAllTransientAncestors(*window1, &ancestors1) ||
42 !GetAllTransientAncestors(*window2, &ancestors2)) { 42 !GetAllTransientAncestors(*window2, &ancestors2)) {
43 return; 43 return;
44 } 44 }
45 // Walk the two chains backwards and look for the first difference. 45 // Walk the two chains backwards and look for the first difference.
46 Window::Windows::const_reverse_iterator it1 = ancestors1.rbegin(); 46 Window::Windows::reverse_iterator it1 = ancestors1.rbegin();
47 Window::Windows::const_reverse_iterator it2 = ancestors2.rbegin(); 47 Window::Windows::reverse_iterator it2 = ancestors2.rbegin();
48 for (; it1 != ancestors1.rend() && it2 != ancestors2.rend(); ++it1, ++it2) { 48 for (; it1 != ancestors1.rend() && it2 != ancestors2.rend(); ++it1, ++it2) {
49 if (*it1 != *it2) { 49 if (*it1 != *it2) {
50 *window1 = *it1; 50 *window1 = *it1;
51 *window2 = *it2; 51 *window2 = *it2;
52 break; 52 break;
53 } 53 }
54 } 54 }
55 } 55 }
56 56
57 // Adjusts |target| so that we don't attempt to stack on top of a window with a 57 // Adjusts |target| so that we don't attempt to stack on top of a window with a
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 if (*direction == Window::STACK_ABOVE && 125 if (*direction == Window::STACK_ABOVE &&
126 ((*target)->layer() && (*target)->layer()->delegate() == NULL)) { 126 ((*target)->layer() && (*target)->layer()->delegate() == NULL)) {
127 return false; 127 return false;
128 } 128 }
129 129
130 return *child != *target; 130 return *child != *target;
131 } 131 }
132 132
133 } // namespace corewm 133 } // namespace corewm
134 } // namespace views 134 } // namespace views
OLDNEW
« no previous file with comments | « ui/native_theme/native_theme_android.cc ('k') | ui/views/layout/grid_layout.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698