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

Side by Side Diff: ash/wm/overview/scoped_transform_overview_window.cc

Issue 143413020: Use a bezier timing function for the overview mode animation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | cc/animation/timing_function.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "ash/wm/overview/scoped_transform_overview_window.h" 5 #include "ash/wm/overview/scoped_transform_overview_window.h"
6 6
7 #include "ash/screen_util.h" 7 #include "ash/screen_util.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/wm/overview/scoped_window_copy.h" 9 #include "ash/wm/overview/scoped_window_copy.h"
10 #include "ash/wm/window_state.h" 10 #include "ash/wm/window_state.h"
(...skipping 13 matching lines...) Expand all
24 // The animation settings used for window selector animations. 24 // The animation settings used for window selector animations.
25 class WindowSelectorAnimationSettings 25 class WindowSelectorAnimationSettings
26 : public ui::ScopedLayerAnimationSettings { 26 : public ui::ScopedLayerAnimationSettings {
27 public: 27 public:
28 WindowSelectorAnimationSettings(aura::Window* window) : 28 WindowSelectorAnimationSettings(aura::Window* window) :
29 ui::ScopedLayerAnimationSettings(window->layer()->GetAnimator()) { 29 ui::ScopedLayerAnimationSettings(window->layer()->GetAnimator()) {
30 SetPreemptionStrategy( 30 SetPreemptionStrategy(
31 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); 31 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET);
32 SetTransitionDuration(base::TimeDelta::FromMilliseconds( 32 SetTransitionDuration(base::TimeDelta::FromMilliseconds(
33 ScopedTransformOverviewWindow::kTransitionMilliseconds)); 33 ScopedTransformOverviewWindow::kTransitionMilliseconds));
34 SetTweenType(gfx::Tween::EASE_OUT); 34 SetTweenType(gfx::Tween::EASE_OUT_BEZIER);
35 } 35 }
36 36
37 virtual ~WindowSelectorAnimationSettings() { 37 virtual ~WindowSelectorAnimationSettings() {
38 } 38 }
39 }; 39 };
40 40
41 void SetTransformOnWindow(aura::Window* window, 41 void SetTransformOnWindow(aura::Window* window,
42 const gfx::Transform& transform, 42 const gfx::Transform& transform,
43 bool animate) { 43 bool animate) {
44 if (animate) { 44 if (animate) {
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 } 260 }
261 261
262 void ScopedTransformOverviewWindow::PrepareForOverview() { 262 void ScopedTransformOverviewWindow::PrepareForOverview() {
263 DCHECK(!overview_started_); 263 DCHECK(!overview_started_);
264 overview_started_ = true; 264 overview_started_ = true;
265 ash::wm::GetWindowState(window_)->set_ignored_by_shelf(true); 265 ash::wm::GetWindowState(window_)->set_ignored_by_shelf(true);
266 RestoreWindow(); 266 RestoreWindow();
267 } 267 }
268 268
269 } // namespace ash 269 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | cc/animation/timing_function.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698