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

Side by Side Diff: ui/compositor/float_animation_curve_adapter.h

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr 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
« no previous file with comments | « ui/compositor/compositor_unittest.cc ('k') | ui/compositor/float_animation_curve_adapter.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 #ifndef UI_COMPOSITOR_FLOAT_ANIMATION_CURVE_ADAPTER_H_ 5 #ifndef UI_COMPOSITOR_FLOAT_ANIMATION_CURVE_ADAPTER_H_
6 #define UI_COMPOSITOR_FLOAT_ANIMATION_CURVE_ADAPTER_H_ 6 #define UI_COMPOSITOR_FLOAT_ANIMATION_CURVE_ADAPTER_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include <memory>
9
9 #include "base/time/time.h" 10 #include "base/time/time.h"
10 #include "cc/animation/animation_curve.h" 11 #include "cc/animation/animation_curve.h"
11 #include "ui/gfx/animation/tween.h" 12 #include "ui/gfx/animation/tween.h"
12 13
13 namespace ui { 14 namespace ui {
14 15
15 class FloatAnimationCurveAdapter : public cc::FloatAnimationCurve { 16 class FloatAnimationCurveAdapter : public cc::FloatAnimationCurve {
16 public: 17 public:
17 FloatAnimationCurveAdapter(gfx::Tween::Type tween_type, 18 FloatAnimationCurveAdapter(gfx::Tween::Type tween_type,
18 float initial_value, 19 float initial_value,
19 float target_value, 20 float target_value,
20 base::TimeDelta duration); 21 base::TimeDelta duration);
21 22
22 ~FloatAnimationCurveAdapter() override {} 23 ~FloatAnimationCurveAdapter() override {}
23 24
24 // FloatAnimationCurve implementation. 25 // FloatAnimationCurve implementation.
25 base::TimeDelta Duration() const override; 26 base::TimeDelta Duration() const override;
26 scoped_ptr<cc::AnimationCurve> Clone() const override; 27 std::unique_ptr<cc::AnimationCurve> Clone() const override;
27 float GetValue(base::TimeDelta t) const override; 28 float GetValue(base::TimeDelta t) const override;
28 29
29 private: 30 private:
30 gfx::Tween::Type tween_type_; 31 gfx::Tween::Type tween_type_;
31 float initial_value_; 32 float initial_value_;
32 float target_value_; 33 float target_value_;
33 base::TimeDelta duration_; 34 base::TimeDelta duration_;
34 }; 35 };
35 36
36 } // namespace ui 37 } // namespace ui
37 38
38 #endif // UI_COMPOSITOR_FLOAT_ANIMATION_CURVE_ADAPTER_H_ 39 #endif // UI_COMPOSITOR_FLOAT_ANIMATION_CURVE_ADAPTER_H_
OLDNEW
« no previous file with comments | « ui/compositor/compositor_unittest.cc ('k') | ui/compositor/float_animation_curve_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698