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

Unified Diff: cc/animation/animation.h

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/PRESUBMIT.py ('k') | cc/animation/animation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/animation/animation.h
diff --git a/cc/animation/animation.h b/cc/animation/animation.h
index c1463223b74a36d596dde789458bee7b960c9dc3..fff74fad900f7a46f24b757e87d4896c895c7775 100644
--- a/cc/animation/animation.h
+++ b/cc/animation/animation.h
@@ -5,8 +5,9 @@
#ifndef CC_ANIMATION_ANIMATION_H_
#define CC_ANIMATION_ANIMATION_H_
+#include <memory>
+
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
#include "cc/animation/target_property.h"
#include "cc/base/cc_export.h"
@@ -58,10 +59,11 @@ class CC_EXPORT Animation {
FILL_MODE_BOTH
};
- static scoped_ptr<Animation> Create(scoped_ptr<AnimationCurve> curve,
- int animation_id,
- int group_id,
- TargetProperty::Type target_property);
+ static std::unique_ptr<Animation> Create(
+ std::unique_ptr<AnimationCurve> curve,
+ int animation_id,
+ int group_id,
+ TargetProperty::Type target_property);
virtual ~Animation();
@@ -144,7 +146,8 @@ class CC_EXPORT Animation {
base::TimeDelta TrimTimeToCurrentIteration(
base::TimeTicks monotonic_time) const;
- scoped_ptr<Animation> CloneAndInitialize(RunState initial_run_state) const;
+ std::unique_ptr<Animation> CloneAndInitialize(
+ RunState initial_run_state) const;
void set_is_controlling_instance_for_test(bool is_controlling_instance) {
is_controlling_instance_ = is_controlling_instance;
@@ -167,14 +170,14 @@ class CC_EXPORT Animation {
bool affects_pending_observers() const { return affects_pending_observers_; }
private:
- Animation(scoped_ptr<AnimationCurve> curve,
+ Animation(std::unique_ptr<AnimationCurve> curve,
int animation_id,
int group_id,
TargetProperty::Type target_property);
base::TimeDelta ConvertToActiveTime(base::TimeTicks monotonic_time) const;
- scoped_ptr<AnimationCurve> curve_;
+ std::unique_ptr<AnimationCurve> curve_;
// IDs must be unique.
int id_;
« no previous file with comments | « cc/PRESUBMIT.py ('k') | cc/animation/animation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698