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

Side by Side Diff: athena/wm/window_overview_mode.cc

Issue 464163005: athena: Fix switching to a window of a different size. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 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 | « athena/wm/window_manager_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "athena/wm/window_overview_mode.h" 5 #include "athena/wm/window_overview_mode.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 for (size_t i = 0; i < window_count; ++i) { 191 for (size_t i = 0; i < window_count; ++i) {
192 float progress = 0.f; 192 float progress = 0.f;
193 aura::Window* window = windows[window_count - 1 - i]; 193 aura::Window* window = windows[window_count - 1 - i];
194 if (i < arraysize(kInitialProgress)) 194 if (i < arraysize(kInitialProgress))
195 progress = kInitialProgress[i]; 195 progress = kInitialProgress[i];
196 196
197 scoped_refptr<ui::LayerAnimator> animator = 197 scoped_refptr<ui::LayerAnimator> animator =
198 window->layer()->GetAnimator(); 198 window->layer()->GetAnimator();
199 199
200 // Unset any in-progress animation. 200 // Unset any in-progress animation.
201 { 201 animator->AbortAllAnimations();
202 ui::ScopedLayerAnimationSettings settings(animator); 202 window->Show();
203 settings.SetPreemptionStrategy( 203 window->SetTransform(gfx::Transform());
204 ui::LayerAnimator::IMMEDIATELY_SET_NEW_TARGET);
205 window->Show();
206 window->SetTransform(gfx::Transform());
207 }
208 // Setup the animation. 204 // Setup the animation.
209 { 205 {
210 ui::ScopedLayerAnimationSettings settings(animator); 206 ui::ScopedLayerAnimationSettings settings(animator);
211 settings.SetPreemptionStrategy( 207 settings.SetPreemptionStrategy(
212 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); 208 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET);
213 settings.SetTransitionDuration(base::TimeDelta::FromMilliseconds(250)); 209 settings.SetTransitionDuration(base::TimeDelta::FromMilliseconds(250));
214 SetWindowProgress(window, progress); 210 SetWindowProgress(window, progress);
215 } 211 }
216 } 212 }
217 } 213 }
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 // static 541 // static
546 scoped_ptr<WindowOverviewMode> WindowOverviewMode::Create( 542 scoped_ptr<WindowOverviewMode> WindowOverviewMode::Create(
547 aura::Window* container, 543 aura::Window* container,
548 const WindowListProvider* window_list_provider, 544 const WindowListProvider* window_list_provider,
549 WindowOverviewModeDelegate* delegate) { 545 WindowOverviewModeDelegate* delegate) {
550 return scoped_ptr<WindowOverviewMode>( 546 return scoped_ptr<WindowOverviewMode>(
551 new WindowOverviewModeImpl(container, window_list_provider, delegate)); 547 new WindowOverviewModeImpl(container, window_list_provider, delegate));
552 } 548 }
553 549
554 } // namespace athena 550 } // namespace athena
OLDNEW
« no previous file with comments | « athena/wm/window_manager_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698