| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/wm/stacking_controller.h" | 5 #include "ash/wm/stacking_controller.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/shell_window_ids.h" | 8 #include "ash/shell_window_ids.h" |
| 9 #include "ash/wm/always_on_top_controller.h" | 9 #include "ash/wm/always_on_top_controller.h" |
| 10 #include "ui/aura/client/aura_constants.h" | 10 #include "ui/aura/client/aura_constants.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 } | 21 } |
| 22 | 22 |
| 23 aura::Window* GetContainerForWindow(aura::Window* window) { | 23 aura::Window* GetContainerForWindow(aura::Window* window) { |
| 24 aura::Window* container = window->parent(); | 24 aura::Window* container = window->parent(); |
| 25 while (container && container->type() != aura::client::WINDOW_TYPE_UNKNOWN) | 25 while (container && container->type() != aura::client::WINDOW_TYPE_UNKNOWN) |
| 26 container = container->parent(); | 26 container = container->parent(); |
| 27 return container; | 27 return container; |
| 28 } | 28 } |
| 29 | 29 |
| 30 bool IsSystemModal(aura::Window* window) { | 30 bool IsSystemModal(aura::Window* window) { |
| 31 return window->transient_parent() && | 31 return window->GetProperty(aura::client::kModalKey) == ui::MODAL_TYPE_SYSTEM; |
| 32 window->GetProperty(aura::client::kModalKey) == ui::MODAL_TYPE_SYSTEM; | |
| 33 } | 32 } |
| 34 | 33 |
| 35 bool IsWindowModal(aura::Window* window) { | 34 bool IsWindowModal(aura::Window* window) { |
| 36 return window->transient_parent() && | 35 return window->transient_parent() && |
| 37 window->GetProperty(aura::client::kModalKey) == ui::MODAL_TYPE_WINDOW; | 36 window->GetProperty(aura::client::kModalKey) == ui::MODAL_TYPE_WINDOW; |
| 38 } | 37 } |
| 39 | 38 |
| 40 } // namespace | 39 } // namespace |
| 41 | 40 |
| 42 //////////////////////////////////////////////////////////////////////////////// | 41 //////////////////////////////////////////////////////////////////////////////// |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 } else { | 109 } else { |
| 111 container = GetContainerById( | 110 container = GetContainerById( |
| 112 internal::kShellWindowId_LockSystemModalContainer); | 111 internal::kShellWindowId_LockSystemModalContainer); |
| 113 } | 112 } |
| 114 | 113 |
| 115 return container; | 114 return container; |
| 116 } | 115 } |
| 117 | 116 |
| 118 } // namespace internal | 117 } // namespace internal |
| 119 } // namespace ash | 118 } // namespace ash |
| OLD | NEW |