| 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 "ui/aura_shell/shadow_controller.h" | 5 #include "ui/aura_shell/shadow_controller.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "ui/aura/client/aura_constants.h" | 10 #include "ui/aura/client/aura_constants.h" |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 window->parent()->layer()->Add(shadow->layer()); | 125 window->parent()->layer()->Add(shadow->layer()); |
| 126 StackShadowBelowWindow(shadow.get(), window); | 126 StackShadowBelowWindow(shadow.get(), window); |
| 127 } | 127 } |
| 128 } | 128 } |
| 129 | 129 |
| 130 void ShadowController::StackShadowBelowWindow(Shadow* shadow, | 130 void ShadowController::StackShadowBelowWindow(Shadow* shadow, |
| 131 aura::Window* window) { | 131 aura::Window* window) { |
| 132 ui::Layer* parent_layer = window->parent()->layer(); | 132 ui::Layer* parent_layer = window->parent()->layer(); |
| 133 DCHECK_EQ(shadow->layer()->parent(), parent_layer); | 133 DCHECK_EQ(shadow->layer()->parent(), parent_layer); |
| 134 | 134 |
| 135 // TODO(derat): Add a MoveBelow() method and use that instead (although we | 135 // TODO(derat): Add a StackBelow() method and use that instead (although we |
| 136 // then run the risk of other layers getting stacked between a window and its | 136 // then run the risk of other layers getting stacked between a window and its |
| 137 // shadow). | 137 // shadow). |
| 138 parent_layer->MoveAbove(shadow->layer(), window->layer()); | 138 parent_layer->StackAbove(shadow->layer(), window->layer()); |
| 139 parent_layer->MoveAbove(window->layer(), shadow->layer()); | 139 parent_layer->StackAbove(window->layer(), shadow->layer()); |
| 140 } | 140 } |
| 141 | 141 |
| 142 } // namespace internal | 142 } // namespace internal |
| 143 } // namespace aura_shell | 143 } // namespace aura_shell |
| OLD | NEW |