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

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

Issue 2911393002: Nix GetRootWindowController, use RootWindowController::ForWindow. (Closed)
Patch Set: Sync and rebase AGAIN Created 3 years, 6 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
« no previous file with comments | « ash/extended_desktop_unittest.cc ('k') | ash/mus/top_level_window_factory.cc » ('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 <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "ash/accelerators/accelerator_controller.h" 10 #include "ash/accelerators/accelerator_controller.h"
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 settings.SetPreemptionStrategy( 372 settings.SetPreemptionStrategy(
373 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); 373 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET);
374 settings.SetTweenType(tween_type); 374 settings.SetTweenType(tween_type);
375 settings.SetTransitionDuration( 375 settings.SetTransitionDuration(
376 base::TimeDelta::FromMilliseconds(duration_in_ms)); 376 base::TimeDelta::FromMilliseconds(duration_in_ms));
377 377
378 display::Display display = 378 display::Display display =
379 display::Screen::GetScreen()->GetDisplayNearestWindow(root_window_); 379 display::Screen::GetScreen()->GetDisplayNearestWindow(root_window_);
380 std::unique_ptr<RootWindowTransformer> transformer( 380 std::unique_ptr<RootWindowTransformer> transformer(
381 CreateRootWindowTransformerForDisplay(root_window_, display)); 381 CreateRootWindowTransformerForDisplay(root_window_, display));
382 GetRootWindowController(root_window_) 382 RootWindowController::ForWindow(root_window_)
383 ->ash_host() 383 ->ash_host()
384 ->SetRootWindowTransformer(std::move(transformer)); 384 ->SetRootWindowTransformer(std::move(transformer));
385 385
386 if (duration_in_ms > 0) 386 if (duration_in_ms > 0)
387 is_on_animation_ = true; 387 is_on_animation_ = true;
388 388
389 return true; 389 return true;
390 } 390 }
391 391
392 void MagnificationControllerImpl::StartOrStopScrollIfNecessary() { 392 void MagnificationControllerImpl::StartOrStopScrollIfNecessary() {
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
894 894
895 //////////////////////////////////////////////////////////////////////////////// 895 ////////////////////////////////////////////////////////////////////////////////
896 // MagnificationController: 896 // MagnificationController:
897 897
898 // static 898 // static
899 MagnificationController* MagnificationController::CreateInstance() { 899 MagnificationController* MagnificationController::CreateInstance() {
900 return new MagnificationControllerImpl(); 900 return new MagnificationControllerImpl();
901 } 901 }
902 902
903 } // namespace ash 903 } // namespace ash
OLDNEW
« no previous file with comments | « ash/extended_desktop_unittest.cc ('k') | ash/mus/top_level_window_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698