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

Side by Side Diff: athena/content/app_activity_registry.cc

Issue 599683003: [Athena, Cleanup] rename WidnowManager::GetInstance -> ::Get (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: fixed unittests 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 unified diff | Download patch
« no previous file with comments | « athena/content/app_activity_proxy.cc ('k') | athena/env/athena_env_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/content/app_activity_registry.h" 5 #include "athena/content/app_activity_registry.h"
6 6
7 #include "athena/activity/public/activity_manager.h" 7 #include "athena/activity/public/activity_manager.h"
8 #include "athena/content/app_activity.h" 8 #include "athena/content/app_activity.h"
9 #include "athena/content/app_activity_proxy.h" 9 #include "athena/content/app_activity_proxy.h"
10 #include "athena/content/public/app_registry.h" 10 #include "athena/content/public/app_registry.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 void AppActivityRegistry::DelayedUnload() { 112 void AppActivityRegistry::DelayedUnload() {
113 if (!ExtensionsDelegate::Get(browser_context_)->UnloadApp(app_id_)) { 113 if (!ExtensionsDelegate::Get(browser_context_)->UnloadApp(app_id_)) {
114 while(!activity_list_.empty()) 114 while(!activity_list_.empty())
115 Activity::Delete(activity_list_.back()); 115 Activity::Delete(activity_list_.back());
116 } 116 }
117 } 117 }
118 118
119 AppActivity* AppActivityRegistry::GetMruActivity() { 119 AppActivity* AppActivityRegistry::GetMruActivity() {
120 DCHECK(activity_list_.size()); 120 DCHECK(activity_list_.size());
121 WindowListProvider* window_list_provider = 121 WindowListProvider* window_list_provider =
122 WindowManager::GetInstance()->GetWindowListProvider(); 122 WindowManager::Get()->GetWindowListProvider();
123 const aura::Window::Windows& children = 123 const aura::Window::Windows& children =
124 window_list_provider->GetWindowList(); 124 window_list_provider->GetWindowList();
125 // Find the first window in the container which is part of the application. 125 // Find the first window in the container which is part of the application.
126 for (aura::Window::Windows::const_iterator child_iterator = children.begin(); 126 for (aura::Window::Windows::const_iterator child_iterator = children.begin();
127 child_iterator != children.end(); ++child_iterator) { 127 child_iterator != children.end(); ++child_iterator) {
128 for (std::vector<AppActivity*>::iterator app_iterator = 128 for (std::vector<AppActivity*>::iterator app_iterator =
129 activity_list_.begin(); 129 activity_list_.begin();
130 app_iterator != activity_list_.end(); ++app_iterator) { 130 app_iterator != activity_list_.end(); ++app_iterator) {
131 if (*child_iterator == (*app_iterator)->GetWindow()) 131 if (*child_iterator == (*app_iterator)->GetWindow())
132 return *app_iterator; 132 return *app_iterator;
133 } 133 }
134 } 134 }
135 NOTREACHED() << "The application does not get tracked by the mru list"; 135 NOTREACHED() << "The application does not get tracked by the mru list";
136 return NULL; 136 return NULL;
137 } 137 }
138 138
139 } // namespace athena 139 } // namespace athena
OLDNEW
« no previous file with comments | « athena/content/app_activity_proxy.cc ('k') | athena/env/athena_env_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698