OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 //////////////////////////////////////////////////////////////////////////////// | 43 //////////////////////////////////////////////////////////////////////////////// |
44 // StackingController, aura::StackingClient implementation: | 44 // StackingController, aura::StackingClient implementation: |
45 | 45 |
46 aura::Window* StackingController::GetDefaultParent(aura::Window* window) { | 46 aura::Window* StackingController::GetDefaultParent(aura::Window* window) { |
47 switch (window->type()) { | 47 switch (window->type()) { |
48 case aura::client::WINDOW_TYPE_NORMAL: | 48 case aura::client::WINDOW_TYPE_NORMAL: |
49 case aura::client::WINDOW_TYPE_POPUP: | 49 case aura::client::WINDOW_TYPE_POPUP: |
50 if (IsWindowModal(window)) | 50 if (IsWindowModal(window)) |
51 return GetModalContainer(window); | 51 return GetModalContainer(window); |
52 return always_on_top_controller_->GetContainer(window); | 52 return always_on_top_controller_->GetContainer(window); |
| 53 case aura::client::WINDOW_TYPE_PANEL: |
| 54 return GetContainer(internal::kShellWindowId_PanelContainer); |
53 case aura::client::WINDOW_TYPE_MENU: | 55 case aura::client::WINDOW_TYPE_MENU: |
54 case aura::client::WINDOW_TYPE_TOOLTIP: | 56 case aura::client::WINDOW_TYPE_TOOLTIP: |
55 return GetContainer(internal::kShellWindowId_MenusAndTooltipsContainer); | 57 return GetContainer(internal::kShellWindowId_MenusAndTooltipsContainer); |
56 default: | 58 default: |
57 NOTREACHED() << "Window " << window->id() | 59 NOTREACHED() << "Window " << window->id() |
58 << " has unhandled type " << window->type(); | 60 << " has unhandled type " << window->type(); |
59 break; | 61 break; |
60 } | 62 } |
61 return NULL; | 63 return NULL; |
62 } | 64 } |
(...skipping 22 matching lines...) Expand all Loading... |
85 if (window_container_id < lock_container_id) | 87 if (window_container_id < lock_container_id) |
86 container = GetContainer(internal::kShellWindowId_ModalContainer); | 88 container = GetContainer(internal::kShellWindowId_ModalContainer); |
87 else | 89 else |
88 container = GetContainer(internal::kShellWindowId_LockModalContainer); | 90 container = GetContainer(internal::kShellWindowId_LockModalContainer); |
89 | 91 |
90 return container; | 92 return container; |
91 } | 93 } |
92 | 94 |
93 } // namespace internal | 95 } // namespace internal |
94 } // namespace ash | 96 } // namespace ash |
OLD | NEW |