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

Unified Diff: ash/wm/ash_focus_rules.cc

Issue 2336653002: Ports SystemModalContainerLayoutManager to ash/common (Closed)
Patch Set: merge again Created 4 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
« no previous file with comments | « ash/shell.cc ('k') | ash/wm/screen_dimmer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/ash_focus_rules.cc
diff --git a/ash/wm/ash_focus_rules.cc b/ash/wm/ash_focus_rules.cc
index 222561013e09cf0ff2f5c9df8662e680fcbde86d..2692711af134198e4b3278eb37549b8e31078ce4 100644
--- a/ash/wm/ash_focus_rules.cc
+++ b/ash/wm/ash_focus_rules.cc
@@ -6,6 +6,7 @@
#include "ash/aura/wm_window_aura.h"
#include "ash/common/shell_window_ids.h"
+#include "ash/common/wm/container_finder.h"
#include "ash/common/wm/focus_rules.h"
#include "ash/common/wm/mru_window_tracker.h"
#include "ash/common/wm/window_state.h"
@@ -117,13 +118,15 @@ aura::Window* AshFocusRules::GetNextActivatableWindow(
aura::Window* AshFocusRules::GetTopmostWindowToActivateForContainerIndex(
int index,
aura::Window* ignore) const {
- aura::Window* window = NULL;
- aura::Window* root = ignore ? ignore->GetRootWindow() : NULL;
- aura::Window::Windows containers = Shell::GetContainersFromAllRootWindows(
- kActivatableShellWindowIds[index], root);
- for (aura::Window::Windows::const_iterator iter = containers.begin();
- iter != containers.end() && !window; ++iter) {
- window = GetTopmostWindowToActivateInContainer((*iter), ignore);
+ aura::Window* window = nullptr;
+ aura::Window* root = ignore ? ignore->GetRootWindow() : nullptr;
+ WmWindow::Windows containers = GetContainersFromAllRootWindows(
+ kActivatableShellWindowIds[index], WmWindowAura::Get(root));
+ for (WmWindow* container : containers) {
+ window = GetTopmostWindowToActivateInContainer(
+ WmWindowAura::GetAuraWindow(container), ignore);
+ if (window)
+ return window;
}
return window;
}
« no previous file with comments | « ash/shell.cc ('k') | ash/wm/screen_dimmer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698