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

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

Issue 1867223004: Convert //ash from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 8 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 <memory>
7 #include <utility> 8 #include <utility>
8 9
9 #include "ash/accelerators/accelerator_controller.h" 10 #include "ash/accelerators/accelerator_controller.h"
10 #include "ash/accessibility_delegate.h" 11 #include "ash/accessibility_delegate.h"
11 #include "ash/ash_switches.h" 12 #include "ash/ash_switches.h"
12 #include "ash/display/root_window_transformers.h" 13 #include "ash/display/root_window_transformers.h"
13 #include "ash/host/ash_window_tree_host.h" 14 #include "ash/host/ash_window_tree_host.h"
14 #include "ash/host/root_window_transformer.h" 15 #include "ash/host/root_window_transformer.h"
15 #include "ash/root_window_controller.h" 16 #include "ash/root_window_controller.h"
16 #include "ash/screen_util.h" 17 #include "ash/screen_util.h"
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 root_window_->layer()->GetAnimator()); 367 root_window_->layer()->GetAnimator());
367 settings.AddObserver(this); 368 settings.AddObserver(this);
368 settings.SetPreemptionStrategy( 369 settings.SetPreemptionStrategy(
369 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); 370 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET);
370 settings.SetTweenType(tween_type); 371 settings.SetTweenType(tween_type);
371 settings.SetTransitionDuration( 372 settings.SetTransitionDuration(
372 base::TimeDelta::FromMilliseconds(duration_in_ms)); 373 base::TimeDelta::FromMilliseconds(duration_in_ms));
373 374
374 gfx::Display display = 375 gfx::Display display =
375 gfx::Screen::GetScreen()->GetDisplayNearestWindow(root_window_); 376 gfx::Screen::GetScreen()->GetDisplayNearestWindow(root_window_);
376 scoped_ptr<RootWindowTransformer> transformer( 377 std::unique_ptr<RootWindowTransformer> transformer(
377 CreateRootWindowTransformerForDisplay(root_window_, display)); 378 CreateRootWindowTransformerForDisplay(root_window_, display));
378 GetRootWindowController(root_window_) 379 GetRootWindowController(root_window_)
379 ->ash_host() 380 ->ash_host()
380 ->SetRootWindowTransformer(std::move(transformer)); 381 ->SetRootWindowTransformer(std::move(transformer));
381 382
382 if (duration_in_ms > 0) 383 if (duration_in_ms > 0)
383 is_on_animation_ = true; 384 is_on_animation_ = true;
384 385
385 return true; 386 return true;
386 } 387 }
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 854
854 //////////////////////////////////////////////////////////////////////////////// 855 ////////////////////////////////////////////////////////////////////////////////
855 // MagnificationController: 856 // MagnificationController:
856 857
857 // static 858 // static
858 MagnificationController* MagnificationController::CreateInstance() { 859 MagnificationController* MagnificationController::CreateInstance() {
859 return new MagnificationControllerImpl(); 860 return new MagnificationControllerImpl();
860 } 861 }
861 862
862 } // namespace ash 863 } // namespace ash
OLDNEW
« no previous file with comments | « ash/magnifier/magnification_controller.h ('k') | ash/metrics/desktop_task_switch_metric_recorder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698