summaryrefslogtreecommitdiffstats
path: root/ash/desktop_background
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-28 22:59:31 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-28 22:59:31 +0000
commit92b18e981f278ae63657c14b1c8c4d5b710afcbc (patch)
tree983fe3ae2be6feb505a0c1825d7c9ac56bc3141e /ash/desktop_background
parent8b4a61a585b621162b043a2ffe5c2154e9fab240 (diff)
downloadchromium_src-92b18e981f278ae63657c14b1c8c4d5b710afcbc.zip
chromium_src-92b18e981f278ae63657c14b1c8c4d5b710afcbc.tar.gz
chromium_src-92b18e981f278ae63657c14b1c8c4d5b710afcbc.tar.bz2
Revert 170071 - Split window_animations, moving basic animations to views/corewm.
The base definition of the animation type enum also moves to corewm, and the API now allows downstream libraries (like ash) to extend the set of animations available. This will allow us to more easily use "core" animations in desktop-aura. I also removed the internal namespace from window_animations that remained in ash, since the use of namespaces in that file had begun to confuse me. http://crbug.com/158115 R=sky@chromium.org Review URL: https://codereview.chromium.org/11412223 TBR=ben@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170084 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/desktop_background')
-rw-r--r--ash/desktop_background/desktop_background_view.cc17
-rw-r--r--ash/desktop_background/user_wallpaper_delegate.h4
2 files changed, 11 insertions, 10 deletions
diff --git a/ash/desktop_background/desktop_background_view.cc b/ash/desktop_background/desktop_background_view.cc
index 3590853..86175a4 100644
--- a/ash/desktop_background/desktop_background_view.cc
+++ b/ash/desktop_background/desktop_background_view.cc
@@ -191,19 +191,20 @@ views::Widget* CreateDesktopBackground(aura::RootWindow* root_window,
params.parent = root_window->GetChildById(container_id);
desktop_widget->Init(params);
desktop_widget->SetContentsView(new DesktopBackgroundView());
- int animation_type = wallpaper_delegate->GetAnimationType();
- views::corewm::SetWindowVisibilityAnimationType(
- desktop_widget->GetNativeView(), animation_type);
+ ash::WindowVisibilityAnimationType animation_type =
+ wallpaper_delegate->GetAnimationType();
+ ash::SetWindowVisibilityAnimationType(desktop_widget->GetNativeView(),
+ animation_type);
// Disable animation when creating the first widget. Otherwise, wallpaper
// will animate from a white screen. Note that boot animation is different.
// It animates from a white background.
- if (animation_type == views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE &&
+ if (animation_type == ash::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE &&
root_window->GetProperty(kAnimatingDesktopController) == NULL) {
- views::corewm::SetWindowVisibilityAnimationTransition(
- desktop_widget->GetNativeView(), views::corewm::ANIMATE_NONE);
+ ash::SetWindowVisibilityAnimationTransition(desktop_widget->GetNativeView(),
+ ash::ANIMATE_NONE);
} else {
- views::corewm::SetWindowVisibilityAnimationTransition(
- desktop_widget->GetNativeView(), views::corewm::ANIMATE_SHOW);
+ ash::SetWindowVisibilityAnimationTransition(desktop_widget->GetNativeView(),
+ ash::ANIMATE_SHOW);
}
desktop_widget->SetBounds(params.parent->bounds());
ui::ScopedLayerAnimationSettings settings(
diff --git a/ash/desktop_background/user_wallpaper_delegate.h b/ash/desktop_background/user_wallpaper_delegate.h
index 440d284..15c6d62 100644
--- a/ash/desktop_background/user_wallpaper_delegate.h
+++ b/ash/desktop_background/user_wallpaper_delegate.h
@@ -6,7 +6,7 @@
#define ASH_DESKTOP_BACKGROUND_USER_WALLPAPER_DELEGATE_H_
#include "ash/ash_export.h"
-#include "ui/views/corewm/window_animations.h"
+#include "ash/wm/window_animations.h"
namespace ash {
@@ -16,7 +16,7 @@ class ASH_EXPORT UserWallpaperDelegate {
// Returns the type of window animation that should be used when showing the
// wallpaper.
- virtual int GetAnimationType() = 0;
+ virtual WindowVisibilityAnimationType GetAnimationType() = 0;
// Should the slower initial animation be shown (as opposed to the faster
// animation that's used e.g. when switching from one user's wallpaper to