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

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

Issue 1608053002: Remove now-unnecessary wrappers around gfx::Screen::GetScreen() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-5
Patch Set: cros Created 4 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 unified diff | Download patch
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 <utility> 7 #include <utility>
8 8
9 #include "ash/accelerators/accelerator_controller.h" 9 #include "ash/accelerators/accelerator_controller.h"
10 #include "ash/accessibility_delegate.h" 10 #include "ash/accessibility_delegate.h"
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 ui::ScopedLayerAnimationSettings settings( 365 ui::ScopedLayerAnimationSettings settings(
366 root_window_->layer()->GetAnimator()); 366 root_window_->layer()->GetAnimator());
367 settings.AddObserver(this); 367 settings.AddObserver(this);
368 settings.SetPreemptionStrategy( 368 settings.SetPreemptionStrategy(
369 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); 369 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET);
370 settings.SetTweenType(tween_type); 370 settings.SetTweenType(tween_type);
371 settings.SetTransitionDuration( 371 settings.SetTransitionDuration(
372 base::TimeDelta::FromMilliseconds(duration_in_ms)); 372 base::TimeDelta::FromMilliseconds(duration_in_ms));
373 373
374 gfx::Display display = 374 gfx::Display display =
375 Shell::GetScreen()->GetDisplayNearestWindow(root_window_); 375 gfx::Screen::GetScreen()->GetDisplayNearestWindow(root_window_);
376 scoped_ptr<RootWindowTransformer> transformer( 376 scoped_ptr<RootWindowTransformer> transformer(
377 CreateRootWindowTransformerForDisplay(root_window_, display)); 377 CreateRootWindowTransformerForDisplay(root_window_, display));
378 GetRootWindowController(root_window_) 378 GetRootWindowController(root_window_)
379 ->ash_host() 379 ->ash_host()
380 ->SetRootWindowTransformer(std::move(transformer)); 380 ->SetRootWindowTransformer(std::move(transformer));
381 381
382 if (duration_in_ms > 0) 382 if (duration_in_ms > 0)
383 is_on_animation_ = true; 383 is_on_animation_ = true;
384 384
385 return true; 385 return true;
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 853
854 //////////////////////////////////////////////////////////////////////////////// 854 ////////////////////////////////////////////////////////////////////////////////
855 // MagnificationController: 855 // MagnificationController:
856 856
857 // static 857 // static
858 MagnificationController* MagnificationController::CreateInstance() { 858 MagnificationController* MagnificationController::CreateInstance() {
859 return new MagnificationControllerImpl(); 859 return new MagnificationControllerImpl();
860 } 860 }
861 861
862 } // namespace ash 862 } // namespace ash
OLDNEW
« no previous file with comments | « ash/frame/caption_buttons/frame_size_button_unittest.cc ('k') | ash/root_window_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698