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

Unified Diff: cc/input/page_scale_animation.cc

Issue 1866203004: Convert //cc from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptrcc: rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/input/page_scale_animation.h ('k') | cc/input/scroll_state.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/input/page_scale_animation.cc
diff --git a/cc/input/page_scale_animation.cc b/cc/input/page_scale_animation.cc
index d66f60a5301cf0a64cc9576f273ffa54916eb27d..96ebd9c1d20d17567eea17a46bb4576733e9c435 100644
--- a/cc/input/page_scale_animation.cc
+++ b/cc/input/page_scale_animation.cc
@@ -7,6 +7,7 @@
#include <math.h>
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "cc/animation/timing_function.h"
#include "ui/gfx/geometry/point_f.h"
#include "ui/gfx/geometry/rect_f.h"
@@ -43,13 +44,13 @@ namespace cc {
using base::TimeTicks;
using base::TimeDelta;
-scoped_ptr<PageScaleAnimation> PageScaleAnimation::Create(
+std::unique_ptr<PageScaleAnimation> PageScaleAnimation::Create(
const gfx::Vector2dF& start_scroll_offset,
float start_page_scale_factor,
const gfx::SizeF& viewport_size,
const gfx::SizeF& root_layer_size,
- scoped_ptr<TimingFunction> timing_function) {
- return make_scoped_ptr(new PageScaleAnimation(
+ std::unique_ptr<TimingFunction> timing_function) {
+ return base::WrapUnique(new PageScaleAnimation(
start_scroll_offset, start_page_scale_factor, viewport_size,
root_layer_size, std::move(timing_function)));
}
@@ -59,7 +60,7 @@ PageScaleAnimation::PageScaleAnimation(
float start_page_scale_factor,
const gfx::SizeF& viewport_size,
const gfx::SizeF& root_layer_size,
- scoped_ptr<TimingFunction> timing_function)
+ std::unique_ptr<TimingFunction> timing_function)
: start_page_scale_factor_(start_page_scale_factor),
target_page_scale_factor_(0.f),
start_scroll_offset_(start_scroll_offset),
« no previous file with comments | « cc/input/page_scale_animation.h ('k') | cc/input/scroll_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698