| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |