| 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/root_window_controller.h" | 7 #include "ash/root_window_controller.h" |
| 8 #include "ash/session_state_delegate.h" | 8 #include "ash/session_state_delegate.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/shell_window_ids.h" | 10 #include "ash/shell_window_ids.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 //////////////////////////////////////////////////////////////////////////////// | 60 //////////////////////////////////////////////////////////////////////////////// |
| 61 // StackingController, public: | 61 // StackingController, public: |
| 62 | 62 |
| 63 StackingController::StackingController() { | 63 StackingController::StackingController() { |
| 64 } | 64 } |
| 65 | 65 |
| 66 StackingController::~StackingController() { | 66 StackingController::~StackingController() { |
| 67 } | 67 } |
| 68 | 68 |
| 69 //////////////////////////////////////////////////////////////////////////////// | 69 //////////////////////////////////////////////////////////////////////////////// |
| 70 // StackingController, aura::StackingClient implementation: | 70 // StackingController, aura::client::WindowTreeClient implementation: |
| 71 | 71 |
| 72 aura::Window* StackingController::GetDefaultParent(aura::Window* context, | 72 aura::Window* StackingController::GetDefaultParent(aura::Window* context, |
| 73 aura::Window* window, | 73 aura::Window* window, |
| 74 const gfx::Rect& bounds) { | 74 const gfx::Rect& bounds) { |
| 75 aura::RootWindow* target_root = NULL; | 75 aura::RootWindow* target_root = NULL; |
| 76 if (window->transient_parent()) { | 76 if (window->transient_parent()) { |
| 77 // Transient window should use the same root as its transient parent. | 77 // Transient window should use the same root as its transient parent. |
| 78 target_root = window->transient_parent()->GetRootWindow(); | 78 target_root = window->transient_parent()->GetRootWindow(); |
| 79 } else { | 79 } else { |
| 80 target_root = FindContainerRoot(bounds); | 80 target_root = FindContainerRoot(bounds); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 root, internal::kShellWindowId_SystemModalContainer); | 140 root, internal::kShellWindowId_SystemModalContainer); |
| 141 } else { | 141 } else { |
| 142 container = GetContainerById( | 142 container = GetContainerById( |
| 143 root, internal::kShellWindowId_LockSystemModalContainer); | 143 root, internal::kShellWindowId_LockSystemModalContainer); |
| 144 } | 144 } |
| 145 | 145 |
| 146 return container; | 146 return container; |
| 147 } | 147 } |
| 148 | 148 |
| 149 } // namespace ash | 149 } // namespace ash |
| OLD | NEW |