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

Unified Diff: athena/content/app_activity_registry.cc

Issue 480293003: Adding functions to the window_list_provider for accessing the activities window list (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed 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 side-by-side diff with in-line comments
Download patch
Index: athena/content/app_activity_registry.cc
diff --git a/athena/content/app_activity_registry.cc b/athena/content/app_activity_registry.cc
index 2af51ce4674f86b433ddab75ee8654f465b070d2..24505df40992550e3e2922d23ecc7de1512ee8a9 100644
--- a/athena/content/app_activity_registry.cc
+++ b/athena/content/app_activity_registry.cc
@@ -10,6 +10,8 @@
#include "athena/content/public/app_registry.h"
#include "athena/extensions/public/extensions_delegate.h"
#include "athena/resource_manager/public/resource_manager.h"
+#include "athena/wm/public/window_list_provider.h"
+#include "athena/wm/public/window_manager.h"
#include "ui/aura/window.h"
#include "ui/views/view.h"
#include "ui/views/widget/widget.h"
@@ -103,9 +105,10 @@ void AppActivityRegistry::RestartApplication(AppActivityProxy* proxy) {
AppActivity* AppActivityRegistry::GetMruActivity() {
DCHECK(activity_list_.size());
- // TODO(skuhne): This should be a query into the window manager.
+ WindowListProvider* window_list_provider =
+ WindowManager::GetInstance()->GetWindowListProvider();
const aura::Window::Windows children =
- activity_list_[0]->GetWindow()->parent()->children();
+ window_list_provider->GetWindowList();
// Find the first window in the container which is part of the application.
for (aura::Window::Windows::const_iterator child_iterator = children.begin();
child_iterator != children.end(); ++child_iterator) {

Powered by Google App Engine
This is Rietveld 408576698