Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2100)

Unified Diff: ui/views/corewm/window_animations.cc

Issue 130983007: Creating multi profile animations for switching users and teleporting of windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/views/corewm/window_animations.cc
diff --git a/ui/views/corewm/window_animations.cc b/ui/views/corewm/window_animations.cc
index 1f90b40a62a0994485274204cad998837210a7d5..e109c76bb4ae0ab4902b30ec91274ff948767c94 100644
--- a/ui/views/corewm/window_animations.cc
+++ b/ui/views/corewm/window_animations.cc
@@ -84,10 +84,11 @@ const float kWindowAnimation_Bounce_Scale = 1.02f;
const int kWindowAnimation_Bounce_DurationMS = 180;
const int kWindowAnimation_Bounce_GrowShrinkDurationPercent = 40;
-base::TimeDelta GetWindowVisibilityAnimationDuration(aura::Window* window) {
+base::TimeDelta GetWindowVisibilityAnimationDuration(
+ const aura::Window& window) {
int duration =
- window->GetProperty(kWindowVisibilityAnimationDurationKey);
- if (duration == 0 && window->type() == ui::wm::WINDOW_TYPE_MENU) {
+ window.GetProperty(kWindowVisibilityAnimationDurationKey);
+ if (duration == 0 && window.type() == ui::wm::WINDOW_TYPE_MENU) {
return base::TimeDelta::FromMilliseconds(
kDefaultAnimationDurationForMenuMS);
}
@@ -255,7 +256,7 @@ void AnimateShowWindowCommon(aura::Window* window,
{
// Property sets within this scope will be implicitly animated.
ui::ScopedLayerAnimationSettings settings(window->layer()->GetAnimator());
- base::TimeDelta duration = GetWindowVisibilityAnimationDuration(window);
+ base::TimeDelta duration = GetWindowVisibilityAnimationDuration(*window);
if (duration.ToInternalValue() > 0)
settings.SetTransitionDuration(duration);
@@ -275,7 +276,7 @@ void AnimateHideWindowCommon(aura::Window* window,
ui::ScopedLayerAnimationSettings settings(window->layer()->GetAnimator());
settings.AddObserver(new HidingWindowAnimationObserver(window));
- base::TimeDelta duration = GetWindowVisibilityAnimationDuration(window);
+ base::TimeDelta duration = GetWindowVisibilityAnimationDuration(*window);
if (duration.ToInternalValue() > 0)
settings.SetTransitionDuration(duration);
@@ -528,6 +529,12 @@ void SetWindowVisibilityAnimationDuration(aura::Window* window,
static_cast<int>(duration.ToInternalValue()));
}
+base::TimeDelta GetWindowVisibilityAnimationDuration(
+ const aura::Window& window) {
+ return base::TimeDelta::FromInternalValue(
+ window.GetProperty(kWindowVisibilityAnimationDurationKey));
+}
+
void SetWindowVisibilityAnimationVerticalPosition(aura::Window* window,
float position) {
window->SetProperty(kWindowVisibilityAnimationVerticalPositionKey, position);
« chrome/browser/chromeos/login/wallpaper_manager.cc ('K') | « ui/views/corewm/window_animations.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698