| 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 "ui/wm/core/visibility_controller.h" | 5 #include "ui/wm/core/visibility_controller.h" |
| 6 | 6 |
| 7 #include "ui/aura/window.h" | 7 #include "ui/aura/window.h" |
| 8 #include "ui/aura/window_property.h" | 8 #include "ui/aura/window_property.h" |
| 9 #include "ui/compositor/layer.h" | 9 #include "ui/compositor/layer.h" |
| 10 #include "ui/wm/core/window_animations.h" | 10 #include "ui/wm/core/window_animations.h" |
| 11 | 11 |
| 12 namespace views { | 12 namespace wm { |
| 13 namespace corewm { | |
| 14 | 13 |
| 15 namespace { | 14 namespace { |
| 16 | 15 |
| 17 // Property set on all windows whose child windows' visibility changes are | 16 // Property set on all windows whose child windows' visibility changes are |
| 18 // animated. | 17 // animated. |
| 19 DEFINE_WINDOW_PROPERTY_KEY( | 18 DEFINE_WINDOW_PROPERTY_KEY( |
| 20 bool, kChildWindowVisibilityChangesAnimatedKey, false); | 19 bool, kChildWindowVisibilityChangesAnimatedKey, false); |
| 21 | 20 |
| 22 bool ShouldAnimateWindow(aura::Window* window) { | 21 bool ShouldAnimateWindow(aura::Window* window) { |
| 23 return window->parent() && window->parent()->GetProperty( | 22 return window->parent() && window->parent()->GetProperty( |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 if (original_enabled_) | 78 if (original_enabled_) |
| 80 window_->SetProperty(kChildWindowVisibilityChangesAnimatedKey, true); | 79 window_->SetProperty(kChildWindowVisibilityChangesAnimatedKey, true); |
| 81 else | 80 else |
| 82 window_->ClearProperty(kChildWindowVisibilityChangesAnimatedKey); | 81 window_->ClearProperty(kChildWindowVisibilityChangesAnimatedKey); |
| 83 } | 82 } |
| 84 | 83 |
| 85 void SetChildWindowVisibilityChangesAnimated(aura::Window* window) { | 84 void SetChildWindowVisibilityChangesAnimated(aura::Window* window) { |
| 86 window->SetProperty(kChildWindowVisibilityChangesAnimatedKey, true); | 85 window->SetProperty(kChildWindowVisibilityChangesAnimatedKey, true); |
| 87 } | 86 } |
| 88 | 87 |
| 89 } // namespace corewm | 88 } // namespace wm |
| 90 } // namespace views | |
| 91 | 89 |
| OLD | NEW |