| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 } else { | 45 } else { |
| 46 if (ShouldShowShadowForWindow(window)) | 46 if (ShouldShowShadowForWindow(window)) |
| 47 CreateShadowForWindow(window); | 47 CreateShadowForWindow(window); |
| 48 } | 48 } |
| 49 } else { | 49 } else { |
| 50 if (shadow && shadow->layer()->parent()) | 50 if (shadow && shadow->layer()->parent()) |
| 51 shadow->layer()->parent()->Remove(shadow->layer()); | 51 shadow->layer()->parent()->Remove(shadow->layer()); |
| 52 } | 52 } |
| 53 } | 53 } |
| 54 | 54 |
| 55 void ShadowController::OnPropertyChanged(aura::Window* window, | 55 void ShadowController::OnWindowPropertyChanged(aura::Window* window, |
| 56 const char* name, | 56 const char* name, |
| 57 void* old) { | 57 void* old) { |
| 58 if (name == aura::kShadowTypeKey) | 58 if (name == aura::kShadowTypeKey) |
| 59 HandlePossibleShadowVisibilityChange(window); | 59 HandlePossibleShadowVisibilityChange(window); |
| 60 } | 60 } |
| 61 | 61 |
| 62 void ShadowController::OnWindowVisibilityChanged(aura::Window* window, | 62 void ShadowController::OnWindowVisibilityChanged(aura::Window* window, |
| 63 bool visible) { | 63 bool visible) { |
| 64 HandlePossibleShadowVisibilityChange(window); | 64 HandlePossibleShadowVisibilityChange(window); |
| 65 } | 65 } |
| 66 | 66 |
| 67 void ShadowController::OnWindowBoundsChanged(aura::Window* window, | 67 void ShadowController::OnWindowBoundsChanged(aura::Window* window, |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 | 134 |
| 135 // TODO(derat): Add a MoveBelow() method and use that instead (although we | 135 // TODO(derat): Add a MoveBelow() 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->MoveAbove(shadow->layer(), window->layer()); |
| 139 parent_layer->MoveAbove(window->layer(), shadow->layer()); | 139 parent_layer->MoveAbove(window->layer(), shadow->layer()); |
| 140 } | 140 } |
| 141 | 141 |
| 142 } // namespace internal | 142 } // namespace internal |
| 143 } // namespace aura_shell | 143 } // namespace aura_shell |
| OLD | NEW |