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

Side by Side Diff: athena/wm/window_list_provider_impl.cc

Issue 574113004: [Athena] Fix switching activities by swiping from the right bezel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@athena_split
Patch Set: Created 6 years, 3 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 | « athena/wm/window_list_provider_impl.h ('k') | athena/wm/window_list_provider_impl_unittest.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 "athena/wm/window_list_provider_impl.h" 5 #include "athena/wm/window_list_provider_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "athena/wm/public/window_list_provider_observer.h" 9 #include "athena/wm/public/window_list_provider_observer.h"
10 #include "ui/aura/window.h" 10 #include "ui/aura/window.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 bool WindowListProviderImpl::IsWindowInList(aura::Window* window) const { 59 bool WindowListProviderImpl::IsWindowInList(aura::Window* window) const {
60 return window->parent() == container_ && IsValidWindow(window); 60 return window->parent() == container_ && IsValidWindow(window);
61 } 61 }
62 62
63 bool WindowListProviderImpl::IsValidWindow(aura::Window* window) const { 63 bool WindowListProviderImpl::IsValidWindow(aura::Window* window) const {
64 // TODO(oshima): crbug.com/413912 64 // TODO(oshima): crbug.com/413912
65 return window->type() == ui::wm::WINDOW_TYPE_NORMAL || 65 return window->type() == ui::wm::WINDOW_TYPE_NORMAL ||
66 window->type() == ui::wm::WINDOW_TYPE_PANEL; 66 window->type() == ui::wm::WINDOW_TYPE_PANEL;
67 } 67 }
68 68
69 void WindowListProviderImpl::MoveToFront(aura::Window* window) {
70 DCHECK(IsWindowInList(window));
71 container_->StackChildAtTop(window);
72 }
73
74 void WindowListProviderImpl::StackWindowFrontOf( 69 void WindowListProviderImpl::StackWindowFrontOf(
75 aura::Window* window, 70 aura::Window* window,
76 aura::Window* reference_window) { 71 aura::Window* reference_window) {
77 DCHECK_NE(window, reference_window); 72 DCHECK_NE(window, reference_window);
78 DCHECK(IsWindowInList(window)); 73 DCHECK(IsWindowInList(window));
79 DCHECK(IsWindowInList(reference_window)); 74 DCHECK(IsWindowInList(reference_window));
80 container_->StackChildAbove(window, reference_window); 75 container_->StackChildAbove(window, reference_window);
81 } 76 }
82 77
83 void WindowListProviderImpl::StackWindowBehindTo( 78 void WindowListProviderImpl::StackWindowBehindTo(
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 return; 112 return;
118 DCHECK(IsWindowInList(window)); 113 DCHECK(IsWindowInList(window));
119 RecreateWindowList(); 114 RecreateWindowList();
120 // Inform our listeners that the stacking has been changed. 115 // Inform our listeners that the stacking has been changed.
121 FOR_EACH_OBSERVER(WindowListProviderObserver, 116 FOR_EACH_OBSERVER(WindowListProviderObserver,
122 observers_, 117 observers_,
123 OnWindowStackingChanged()); 118 OnWindowStackingChanged());
124 } 119 }
125 120
126 } // namespace athena 121 } // namespace athena
OLDNEW
« no previous file with comments | « athena/wm/window_list_provider_impl.h ('k') | athena/wm/window_list_provider_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698