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

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: 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 <utility> 7 #include <utility>
oshima 2016/04/08 07:09:40 include?
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"
11 #include "ash/ash_switches.h" 11 #include "ash/ash_switches.h"
12 #include "ash/display/root_window_transformers.h" 12 #include "ash/display/root_window_transformers.h"
13 #include "ash/host/ash_window_tree_host.h" 13 #include "ash/host/ash_window_tree_host.h"
14 #include "ash/host/root_window_transformer.h" 14 #include "ash/host/root_window_transformer.h"
15 #include "ash/root_window_controller.h" 15 #include "ash/root_window_controller.h"
16 #include "ash/screen_util.h" 16 #include "ash/screen_util.h"
17 #include "ash/shell.h" 17 #include "ash/shell.h"
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 gfx::Screen::GetScreen()->GetDisplayNearestWindow(root_window_); 375 gfx::Screen::GetScreen()->GetDisplayNearestWindow(root_window_);
376 scoped_ptr<RootWindowTransformer> transformer( 376 std::unique_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;
386 } 386 }
(...skipping 466 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

Powered by Google App Engine
This is Rietveld 408576698