| 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 "athena/wm/window_list_provider_impl.h" | 5 #include "athena/wm/window_list_provider_impl.h" |
| 6 | 6 |
| 7 #include "athena/wm/public/window_list_provider_observer.h" | 7 #include "athena/wm/public/window_list_provider_observer.h" |
| 8 #include "ui/aura/window.h" | 8 #include "ui/aura/window.h" |
| 9 | 9 |
| 10 namespace athena { | 10 namespace athena { |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 list.push_back(*iter); | 46 list.push_back(*iter); |
| 47 } | 47 } |
| 48 return list; | 48 return list; |
| 49 } | 49 } |
| 50 | 50 |
| 51 bool WindowListProviderImpl::IsWindowInList(aura::Window* window) const { | 51 bool WindowListProviderImpl::IsWindowInList(aura::Window* window) const { |
| 52 return window->parent() == container_ && IsValidWindow(window); | 52 return window->parent() == container_ && IsValidWindow(window); |
| 53 } | 53 } |
| 54 | 54 |
| 55 bool WindowListProviderImpl::IsValidWindow(aura::Window* window) const { | 55 bool WindowListProviderImpl::IsValidWindow(aura::Window* window) const { |
| 56 return window->type() == ui::wm::WINDOW_TYPE_NORMAL; | 56 // TODO(oshima): crbug.com/413912 |
| 57 return window->type() == ui::wm::WINDOW_TYPE_NORMAL || |
| 58 window->type() == ui::wm::WINDOW_TYPE_PANEL; |
| 57 } | 59 } |
| 58 | 60 |
| 59 void WindowListProviderImpl::MoveToFront(aura::Window* window) { | 61 void WindowListProviderImpl::MoveToFront(aura::Window* window) { |
| 60 DCHECK(IsWindowInList(window)); | 62 DCHECK(IsWindowInList(window)); |
| 61 container_->StackChildAtTop(window); | 63 container_->StackChildAtTop(window); |
| 62 } | 64 } |
| 63 | 65 |
| 64 void WindowListProviderImpl::StackWindowFrontOf( | 66 void WindowListProviderImpl::StackWindowFrontOf( |
| 65 aura::Window* window, | 67 aura::Window* window, |
| 66 aura::Window* reference_window) { | 68 aura::Window* reference_window) { |
| (...skipping 30 matching lines...) Expand all Loading... |
| 97 if (window == container_) | 99 if (window == container_) |
| 98 return; | 100 return; |
| 99 DCHECK(IsWindowInList(window)); | 101 DCHECK(IsWindowInList(window)); |
| 100 // Inform our listeners that the stacking has been changed. | 102 // Inform our listeners that the stacking has been changed. |
| 101 FOR_EACH_OBSERVER(WindowListProviderObserver, | 103 FOR_EACH_OBSERVER(WindowListProviderObserver, |
| 102 observers_, | 104 observers_, |
| 103 OnWindowStackingChanged()); | 105 OnWindowStackingChanged()); |
| 104 } | 106 } |
| 105 | 107 |
| 106 } // namespace athena | 108 } // namespace athena |
| OLD | NEW |