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

Side by Side Diff: ash/magnifier/magnification_controller.cc

Issue 23531053: ui/base/animation -> ui/gfx/animation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge 2 trunk Created 7 years, 3 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 | « ash/launcher/launcher_view.cc ('k') | ash/shelf/background_animator.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/magnifier/magnification_controller.h" 5 #include "ash/magnifier/magnification_controller.h"
6 6
7 #include "ash/display/root_window_transformers.h" 7 #include "ash/display/root_window_transformers.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/shell_delegate.h" 9 #include "ash/shell_delegate.h"
10 #include "ash/system/tray/system_tray_delegate.h" 10 #include "ash/system/tray/system_tray_delegate.h"
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 // Flips the signs intentionally to convert them from the position of the 258 // Flips the signs intentionally to convert them from the position of the
259 // magnification window. 259 // magnification window.
260 transform.Scale(scale_, scale_); 260 transform.Scale(scale_, scale_);
261 transform.Translate(-origin_.x(), -origin_.y()); 261 transform.Translate(-origin_.x(), -origin_.y());
262 262
263 ui::ScopedLayerAnimationSettings settings( 263 ui::ScopedLayerAnimationSettings settings(
264 root_window_->layer()->GetAnimator()); 264 root_window_->layer()->GetAnimator());
265 settings.AddObserver(this); 265 settings.AddObserver(this);
266 settings.SetPreemptionStrategy( 266 settings.SetPreemptionStrategy(
267 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); 267 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET);
268 settings.SetTweenType(ui::Tween::EASE_OUT); 268 settings.SetTweenType(gfx::Tween::EASE_OUT);
269 settings.SetTransitionDuration( 269 settings.SetTransitionDuration(
270 base::TimeDelta::FromMilliseconds(animate ? 100 : 0)); 270 base::TimeDelta::FromMilliseconds(animate ? 100 : 0));
271 271
272 gfx::Display display = 272 gfx::Display display =
273 Shell::GetScreen()->GetDisplayNearestWindow(root_window_); 273 Shell::GetScreen()->GetDisplayNearestWindow(root_window_);
274 scoped_ptr<aura::RootWindowTransformer> transformer( 274 scoped_ptr<aura::RootWindowTransformer> transformer(
275 internal::CreateRootWindowTransformerForDisplay(root_window_, display)); 275 internal::CreateRootWindowTransformerForDisplay(root_window_, display));
276 root_window_->SetRootWindowTransformer(transformer.Pass()); 276 root_window_->SetRootWindowTransformer(transformer.Pass());
277 277
278 if (animate) 278 if (animate)
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 622
623 //////////////////////////////////////////////////////////////////////////////// 623 ////////////////////////////////////////////////////////////////////////////////
624 // MagnificationController: 624 // MagnificationController:
625 625
626 // static 626 // static
627 MagnificationController* MagnificationController::CreateInstance() { 627 MagnificationController* MagnificationController::CreateInstance() {
628 return new MagnificationControllerImpl(); 628 return new MagnificationControllerImpl();
629 } 629 }
630 630
631 } // namespace ash 631 } // namespace ash
OLDNEW
« no previous file with comments | « ash/launcher/launcher_view.cc ('k') | ash/shelf/background_animator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698