diff options
Diffstat (limited to 'ui/wm/public/animation_host.cc')
-rw-r--r-- | ui/wm/public/animation_host.cc | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/ui/wm/public/animation_host.cc b/ui/wm/public/animation_host.cc new file mode 100644 index 0000000..0d90f9c --- /dev/null +++ b/ui/wm/public/animation_host.cc @@ -0,0 +1,28 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ui/wm/public/animation_host.h" + +#include "ui/aura/window.h" +#include "ui/aura/window_property.h" + +DECLARE_WINDOW_PROPERTY_TYPE(aura::client::AnimationHost*) + +namespace aura { +namespace client { + +DEFINE_WINDOW_PROPERTY_KEY(AnimationHost*, kRootWindowAnimationHostKey, NULL); + +void SetAnimationHost(Window* window, AnimationHost* animation_host) { + DCHECK(window); + window->SetProperty(kRootWindowAnimationHostKey, animation_host); +} + +AnimationHost* GetAnimationHost(Window* window) { + DCHECK(window); + return window->GetProperty(kRootWindowAnimationHostKey); +} + +} // namespace client +} // namespace aura |