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

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
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..8b4cba5abdc2831bd80c81ccc263c33300e366b0
--- /dev/null
+++ b/athena/wm/window_list_provider_impl.cc
@@ -0,0 +1,31 @@
+// 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;
+}
+
+} // namespace athena
« 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