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

Side by Side Diff: ash/common/wm/focus_rules.cc

Issue 2430593002: mash: Use ash shell window container ids instead of ash::mojom::Container (Closed)
Patch Set: rebase Created 4 years, 2 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 | « ash/common/wm/dock/docked_window_resizer.cc ('k') | ash/common/wm/fullscreen_window_finder.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ash/common/wm/focus_rules.h" 5 #include "ash/common/wm/focus_rules.h"
6 6
7 #include "ash/common/shell_window_ids.h"
8 #include "ash/common/wm/window_state.h" 7 #include "ash/common/wm/window_state.h"
9 #include "ash/common/wm_shell.h" 8 #include "ash/common/wm_shell.h"
10 #include "ash/common/wm_window.h" 9 #include "ash/common/wm_window.h"
10 #include "ash/public/cpp/shell_window_ids.h"
11 11
12 namespace ash { 12 namespace ash {
13 13
14 bool IsToplevelWindow(WmWindow* window) { 14 bool IsToplevelWindow(WmWindow* window) {
15 DCHECK(window); 15 DCHECK(window);
16 // The window must in a valid hierarchy. 16 // The window must in a valid hierarchy.
17 if (!window->GetRootWindow()) 17 if (!window->GetRootWindow())
18 return false; 18 return false;
19 19
20 // The window must exist within a container that supports activation. 20 // The window must exist within a container that supports activation.
(...skipping 28 matching lines...) Expand all
49 49
50 if (!window->GetTargetVisibility()) 50 if (!window->GetTargetVisibility())
51 return false; 51 return false;
52 52
53 const int parent_shell_window_id = window->GetParent()->GetShellWindowId(); 53 const int parent_shell_window_id = window->GetParent()->GetShellWindowId();
54 return parent_shell_window_id == kShellWindowId_DefaultContainer || 54 return parent_shell_window_id == kShellWindowId_DefaultContainer ||
55 parent_shell_window_id == kShellWindowId_LockScreenContainer; 55 parent_shell_window_id == kShellWindowId_LockScreenContainer;
56 } 56 }
57 57
58 } // namespace ash 58 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/wm/dock/docked_window_resizer.cc ('k') | ash/common/wm/fullscreen_window_finder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698