diff options
author | scottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-25 18:39:03 +0000 |
---|---|---|
committer | scottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-25 18:39:03 +0000 |
commit | bdcf3bbfb044997e66ca32e49284192c34c1d948 (patch) | |
tree | 8775ed4762f419c0fea7ab59bdf1ca27bd8f8f47 /ui/aura/client/animation_host.cc | |
parent | d82313899e26565d86e3f95a79202f5d199e8191 (diff) | |
download | chromium_src-bdcf3bbfb044997e66ca32e49284192c34c1d948.zip chromium_src-bdcf3bbfb044997e66ca32e49284192c34c1d948.tar.gz chromium_src-bdcf3bbfb044997e66ca32e49284192c34c1d948.tar.bz2 |
make menus, bubbles, etc. top level windows on aura
Makes these windows top-level so they interact with the system better (and also maintain focus better in some cases)
Two additional delegations:
- One to notify when the animation is complete because when closing a window the root window close needs to be deferred until after the animation is complete.
- One to add extra space to the root window used during animations.
R=sky@chromium.org
BUG=175016,175833,179786,180071,181175
Review URL: https://chromiumcodereview.appspot.com/12342028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@190446 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura/client/animation_host.cc')
-rw-r--r-- | ui/aura/client/animation_host.cc | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/ui/aura/client/animation_host.cc b/ui/aura/client/animation_host.cc new file mode 100644 index 0000000..5df22ba --- /dev/null +++ b/ui/aura/client/animation_host.cc @@ -0,0 +1,32 @@ +// 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/aura/client/animation_host.h" + +#include "base/compiler_specific.h" +#include "ui/aura/aura_export.h" + +#include "ui/aura/env.h" +#include "ui/aura/root_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 |