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

Side by Side Diff: sky/viewer/cc/web_animation_impl.h

Issue 752683002: Break Sky's dependency on cc (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 | « sky/viewer/cc/web_animation_curve_common.cc ('k') | sky/viewer/cc/web_animation_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef SKY_VIEWER_CC_WEB_ANIMATION_IMPL_H_
6 #define SKY_VIEWER_CC_WEB_ANIMATION_IMPL_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "sky/viewer/cc/sky_viewer_cc_export.h"
10 #include "sky/engine/public/platform/WebCompositorAnimation.h"
11
12 namespace cc {
13 class Animation;
14 }
15
16 namespace blink {
17 class WebCompositorAnimationCurve;
18 }
19
20 namespace sky_viewer_cc {
21
22 class WebCompositorAnimationImpl : public blink::WebCompositorAnimation {
23 public:
24 SKY_VIEWER_CC_EXPORT WebCompositorAnimationImpl(
25 const blink::WebCompositorAnimationCurve& curve,
26 TargetProperty target,
27 int animation_id,
28 int group_id);
29 virtual ~WebCompositorAnimationImpl();
30
31 // blink::WebCompositorAnimation implementation
32 virtual int id();
33 virtual TargetProperty targetProperty() const;
34 #if WEB_ANIMATION_SUPPORTS_FRACTIONAL_ITERATIONS
35 virtual double iterations() const;
36 virtual void setIterations(double iterations);
37 #else
38 virtual int iterations() const;
39 virtual void setIterations(int iterations);
40 #endif
41 virtual double startTime() const;
42 virtual void setStartTime(double monotonic_time);
43 virtual double timeOffset() const;
44 virtual void setTimeOffset(double monotonic_time);
45 #if WEB_ANIMATION_SUPPORTS_FULL_DIRECTION
46 virtual Direction direction() const;
47 virtual void setDirection(Direction);
48 #else
49 virtual bool alternatesDirection() const;
50 virtual void setAlternatesDirection(bool alternates);
51 #endif
52 virtual double playbackRate() const;
53 virtual void setPlaybackRate(double playback_rate);
54
55 scoped_ptr<cc::Animation> PassAnimation();
56
57 private:
58 scoped_ptr<cc::Animation> animation_;
59
60 DISALLOW_COPY_AND_ASSIGN(WebCompositorAnimationImpl);
61 };
62
63 } // namespace sky_viewer_cc
64
65 #endif // SKY_VIEWER_CC_WEB_ANIMATION_IMPL_H_
OLDNEW
« no previous file with comments | « sky/viewer/cc/web_animation_curve_common.cc ('k') | sky/viewer/cc/web_animation_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698