| OLD | NEW |
| 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/resource_manager/public/resource_manager.h" | 5 #include "athena/resource_manager/public/resource_manager.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "athena/activity/public/activity.h" | 10 #include "athena/activity/public/activity.h" |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 | 188 |
| 189 void ResourceManagerImpl::OnSplitViewModeExit() { | 189 void ResourceManagerImpl::OnSplitViewModeExit() { |
| 190 // We don't do immediately something yet. The next ManageResource call will | 190 // We don't do immediately something yet. The next ManageResource call will |
| 191 // come soon. | 191 // come soon. |
| 192 in_splitview_mode_ = false; | 192 in_splitview_mode_ = false; |
| 193 } | 193 } |
| 194 | 194 |
| 195 void ResourceManagerImpl::OnWindowStackingChanged(aura::Window* window) { | 195 void ResourceManagerImpl::OnWindowStackingChanged(aura::Window* window) { |
| 196 // TODO(skuhne): This needs to be changed to some WindowListProvider observer | 196 // TODO(skuhne): This needs to be changed to some WindowListProvider observer |
| 197 // if we decouple window order from activity order. | 197 // if we decouple window order from activity order. |
| 198 activity_order_changed_ = true; |
| 199 if (pause_) { |
| 200 queued_command_ = true; |
| 201 return; |
| 202 } |
| 198 | 203 |
| 199 // No need to do anything while being in overview mode. | 204 // No need to do anything while being in overview mode. |
| 200 if (in_overview_mode_) | 205 if (in_overview_mode_) |
| 201 return; | 206 return; |
| 202 | 207 |
| 203 // As long as we have to manage the list of activities ourselves, we need to | 208 // As long as we have to manage the list of activities ourselves, we need to |
| 204 // order it here. | 209 // order it here. |
| 205 UpdateActivityOrder(); | 210 UpdateActivityOrder(); |
| 206 | 211 |
| 207 // Manage the resources of each activity. | 212 // Manage the resources of each activity. |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 } | 398 } |
| 394 | 399 |
| 395 ResourceManager::ResourceManager() {} | 400 ResourceManager::ResourceManager() {} |
| 396 | 401 |
| 397 ResourceManager::~ResourceManager() { | 402 ResourceManager::~ResourceManager() { |
| 398 DCHECK(instance); | 403 DCHECK(instance); |
| 399 instance = NULL; | 404 instance = NULL; |
| 400 } | 405 } |
| 401 | 406 |
| 402 } // namespace athena | 407 } // namespace athena |
| OLD | NEW |