Chromium Code Reviews| Index: athena/resource_manager/resource_manager_impl.cc |
| diff --git a/athena/resource_manager/resource_manager_impl.cc b/athena/resource_manager/resource_manager_impl.cc |
| index 8e10cb8b8b3fbc8015d5763bb9bf6d6dcf2949ea..9c18a757a4611e925db5309504e7a58e31dd9d71 100644 |
| --- a/athena/resource_manager/resource_manager_impl.cc |
| +++ b/athena/resource_manager/resource_manager_impl.cc |
| @@ -167,15 +167,15 @@ ResourceManagerImpl::ResourceManagerImpl(ResourceManagerDelegate* delegate) |
| next_resource_management_time_(base::Time::Now()), |
| wait_time_for_resource_deallocation_(base::TimeDelta::FromMilliseconds( |
| delegate_->MemoryPressureIntervalInMS())) { |
| - WindowManager::GetInstance()->AddObserver(this); |
| - WindowManager::GetInstance()->GetWindowListProvider()->AddObserver(this); |
| + WindowManager::Get()->AddObserver(this); |
| + WindowManager::Get()->GetWindowListProvider()->AddObserver(this); |
| ActivityManager::Get()->AddObserver(this); |
| } |
| ResourceManagerImpl::~ResourceManagerImpl() { |
| ActivityManager::Get()->RemoveObserver(this); |
| - WindowManager::GetInstance()->GetWindowListProvider()->RemoveObserver(this); |
| - WindowManager::GetInstance()->RemoveObserver(this); |
| + WindowManager::Get()->GetWindowListProvider()->RemoveObserver(this); |
| + WindowManager::Get()->RemoveObserver(this); |
| while (!activity_list_.empty()) |
| OnActivityEnding(activity_list_.front()); |
| @@ -418,7 +418,7 @@ void ResourceManagerImpl::UpdateActivityOrder() { |
| return; |
| std::vector<Activity*> new_activity_list; |
| const aura::Window::Windows children = |
| - activity_list_[0]->GetWindow()->parent()->children(); |
| + WindowManager::Get()->GetWindowListProvider()->GetWindowList(); |
|
Jun Mukai
2014/09/23 23:01:49
IIRC this intentionally doesn't use WindowListProv
Jun Mukai
2014/09/23 23:20:08
chatted offline and this is actually a good move.
Mr4D (OOO till 08-26)
2014/09/23 23:21:02
When this was written the WindowListProvider did n
|
| // Find the first window in the container which is part of the application. |
| for (aura::Window::Windows::const_reverse_iterator child_iterator = |
| children.rbegin(); |