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

Unified Diff: athena/wm/window_list_provider_impl.cc

Issue 470083004: athena: A simpler implementation of WindowListProvider. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698