| 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 | |
| 18 namespace athena { | 16 namespace athena { |
| 19 namespace { | 17 namespace { |
| 20 | 18 |
| 21 DEFINE_OWNED_WINDOW_PROPERTY_KEY(ModalWindowController, | 19 DEFINE_OWNED_WINDOW_PROPERTY_KEY(ModalWindowController, |
| 22 kModalWindowControllerKey, | 20 kModalWindowControllerKey, |
| 23 nullptr); | 21 nullptr); |
| 24 | 22 |
| 25 } // namespace | 23 } // namespace |
| 26 | 24 |
| 27 // static | 25 // static |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 // recreate layers for the container so that animation can continue | 143 // recreate layers for the container so that animation can continue |
| 146 // even if the container is removed immediately. | 144 // even if the container is removed immediately. |
| 147 wm::ScopedHidingAnimationSettings settings(modal_container_); | 145 wm::ScopedHidingAnimationSettings settings(modal_container_); |
| 148 settings.layer_animation_settings()->SetTransitionDuration( | 146 settings.layer_animation_settings()->SetTransitionDuration( |
| 149 base::TimeDelta::FromMilliseconds(kDimmAnimationDurationMs)); | 147 base::TimeDelta::FromMilliseconds(kDimmAnimationDurationMs)); |
| 150 modal_container_->layer()->SetOpacity(0.0f); | 148 modal_container_->layer()->SetOpacity(0.0f); |
| 151 } | 149 } |
| 152 } | 150 } |
| 153 | 151 |
| 154 } // namespace athena | 152 } // namespace athena |
| OLD | NEW |