| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "athena/screen/modal_window_controller.h" | 5 #include "athena/screen/modal_window_controller.h" |
| 6 | 6 |
| 7 #include "athena/screen/public/screen_manager.h" | 7 #include "athena/screen/public/screen_manager.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "ui/aura/window.h" | 9 #include "ui/aura/window.h" |
| 10 #include "ui/aura/window_property.h" | 10 #include "ui/aura/window_property.h" |
| 11 #include "ui/compositor/layer.h" | 11 #include "ui/compositor/layer.h" |
| 12 #include "ui/compositor/layer_animation_observer.h" | 12 #include "ui/compositor/layer_animation_observer.h" |
| 13 #include "ui/compositor/scoped_layer_animation_settings.h" | 13 #include "ui/compositor/scoped_layer_animation_settings.h" |
| 14 #include "ui/wm/core/window_animations.h" | 14 #include "ui/wm/core/window_animations.h" |
| 15 | 15 |
| 16 DECLARE_WINDOW_PROPERTY_TYPE(athena::ModalWindowController*); |
| 17 |
| 16 namespace athena { | 18 namespace athena { |
| 17 namespace { | 19 namespace { |
| 18 | 20 |
| 19 DEFINE_OWNED_WINDOW_PROPERTY_KEY(ModalWindowController, | 21 DEFINE_OWNED_WINDOW_PROPERTY_KEY(ModalWindowController, |
| 20 kModalWindowControllerKey, | 22 kModalWindowControllerKey, |
| 21 nullptr); | 23 nullptr); |
| 22 | 24 |
| 23 } // namespace | 25 } // namespace |
| 24 | 26 |
| 25 // static | 27 // static |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 // recreate layers for the container so that animation can continue | 145 // recreate layers for the container so that animation can continue |
| 144 // even if the container is removed immediately. | 146 // even if the container is removed immediately. |
| 145 wm::ScopedHidingAnimationSettings settings(modal_container_); | 147 wm::ScopedHidingAnimationSettings settings(modal_container_); |
| 146 settings.layer_animation_settings()->SetTransitionDuration( | 148 settings.layer_animation_settings()->SetTransitionDuration( |
| 147 base::TimeDelta::FromMilliseconds(kDimmAnimationDurationMs)); | 149 base::TimeDelta::FromMilliseconds(kDimmAnimationDurationMs)); |
| 148 modal_container_->layer()->SetOpacity(0.0f); | 150 modal_container_->layer()->SetOpacity(0.0f); |
| 149 } | 151 } |
| 150 } | 152 } |
| 151 | 153 |
| 152 } // namespace athena | 154 } // namespace athena |
| OLD | NEW |