Chromium Code Reviews| Index: athena/wm/window_list_provider_impl.cc |
| diff --git a/athena/wm/window_list_provider_impl.cc b/athena/wm/window_list_provider_impl.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..708040d5689e6660d4cfb6010bee9335bd3808d0 |
| --- /dev/null |
| +++ b/athena/wm/window_list_provider_impl.cc |
| @@ -0,0 +1,36 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "athena/wm/window_list_provider_impl.h" |
| + |
| +#include "ui/aura/window.h" |
| + |
| +namespace athena { |
| + |
| +WindowListProviderImpl::WindowListProviderImpl(aura::Window* container) |
| + : container_(container) { |
| + CHECK(container_); |
| +} |
| + |
| +WindowListProviderImpl::~WindowListProviderImpl() { |
| +} |
| + |
| +aura::Window::Windows WindowListProviderImpl::GetWindowList() const { |
| + aura::Window::Windows list; |
| + const aura::Window::Windows& container_children = container_->children(); |
| + for (aura::Window::Windows::const_iterator iter = container_children.begin(); |
| + iter != container_children.end(); |
| + ++iter) { |
| + if ((*iter)->type() == ui::wm::WINDOW_TYPE_NORMAL) |
| + list.push_back(*iter); |
| + } |
| + return list; |
| +} |
| + |
| +void WindowListProviderImpl::MoveToFront(aura::Window* window) { |
| + CHECK_EQ(container_, window->parent()); |
| + container_->StackChildAtTop(window); |
|
oshima
2014/08/14 22:07:05
window moves to top when activation changes. Would
mfomitchev
2014/08/14 22:19:08
In practice I think we could get rid of all of tho
sadrul
2014/08/14 23:47:22
Removed MoveToFront() from the interface
|
| +} |
| + |
| +} // namespace athena |