| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/client/animation_host.h" | 5 #include "ui/aura/client/animation_host.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "ui/aura/aura_export.h" | 8 #include "ui/aura/aura_export.h" |
| 9 | 9 |
| 10 #include "ui/aura/env.h" | 10 #include "ui/aura/env.h" |
| 11 #include "ui/aura/root_window.h" | 11 #include "ui/aura/window_event_dispatcher.h" |
| 12 #include "ui/aura/window_property.h" | 12 #include "ui/aura/window_property.h" |
| 13 | 13 |
| 14 DECLARE_WINDOW_PROPERTY_TYPE(aura::client::AnimationHost*) | 14 DECLARE_WINDOW_PROPERTY_TYPE(aura::client::AnimationHost*) |
| 15 | 15 |
| 16 namespace aura { | 16 namespace aura { |
| 17 namespace client { | 17 namespace client { |
| 18 | 18 |
| 19 DEFINE_WINDOW_PROPERTY_KEY(AnimationHost*, kRootWindowAnimationHostKey, NULL); | 19 DEFINE_WINDOW_PROPERTY_KEY(AnimationHost*, kRootWindowAnimationHostKey, NULL); |
| 20 | 20 |
| 21 void SetAnimationHost(Window* window, AnimationHost* animation_host) { | 21 void SetAnimationHost(Window* window, AnimationHost* animation_host) { |
| 22 DCHECK(window); | 22 DCHECK(window); |
| 23 window->SetProperty(kRootWindowAnimationHostKey, animation_host); | 23 window->SetProperty(kRootWindowAnimationHostKey, animation_host); |
| 24 } | 24 } |
| 25 | 25 |
| 26 AnimationHost* GetAnimationHost(Window* window) { | 26 AnimationHost* GetAnimationHost(Window* window) { |
| 27 DCHECK(window); | 27 DCHECK(window); |
| 28 return window->GetProperty(kRootWindowAnimationHostKey); | 28 return window->GetProperty(kRootWindowAnimationHostKey); |
| 29 } | 29 } |
| 30 | 30 |
| 31 } // namespace client | 31 } // namespace client |
| 32 } // namespace aura | 32 } // namespace aura |
| OLD | NEW |