| OLD | NEW |
| (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 CC_BLINK_WEB_COMPOSITOR_ANIMATION_PLAYER_IMPL_H_ | |
| 6 #define CC_BLINK_WEB_COMPOSITOR_ANIMATION_PLAYER_IMPL_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "base/memory/ref_counted.h" | |
| 10 #include "base/memory/scoped_ptr.h" | |
| 11 #include "cc/blink/cc_blink_export.h" | |
| 12 #include "third_party/WebKit/public/platform/WebCompositorAnimationPlayer.h" | |
| 13 | |
| 14 namespace cc { | |
| 15 class AnimationPlayer; | |
| 16 } | |
| 17 | |
| 18 namespace cc_blink { | |
| 19 | |
| 20 class WebToCCAnimationDelegateAdapter; | |
| 21 | |
| 22 class WebCompositorAnimationPlayerImpl | |
| 23 : public blink::WebCompositorAnimationPlayer { | |
| 24 public: | |
| 25 CC_BLINK_EXPORT WebCompositorAnimationPlayerImpl(); | |
| 26 ~WebCompositorAnimationPlayerImpl() override; | |
| 27 | |
| 28 CC_BLINK_EXPORT cc::AnimationPlayer* animation_player() const; | |
| 29 | |
| 30 // blink::WebCompositorAnimationPlayer implementation | |
| 31 void setAnimationDelegate( | |
| 32 blink::WebCompositorAnimationDelegate* delegate) override; | |
| 33 void attachLayer(blink::WebLayer* web_layer) override; | |
| 34 void detachLayer() override; | |
| 35 bool isLayerAttached() const override; | |
| 36 void addAnimation(blink::WebCompositorAnimation* animation) override; | |
| 37 void removeAnimation(int animation_id) override; | |
| 38 void pauseAnimation(int animation_id, double time_offset) override; | |
| 39 void abortAnimation(int animation_id) override; | |
| 40 | |
| 41 private: | |
| 42 scoped_refptr<cc::AnimationPlayer> animation_player_; | |
| 43 scoped_ptr<WebToCCAnimationDelegateAdapter> animation_delegate_adapter_; | |
| 44 | |
| 45 DISALLOW_COPY_AND_ASSIGN(WebCompositorAnimationPlayerImpl); | |
| 46 }; | |
| 47 | |
| 48 } // namespace cc_blink | |
| 49 | |
| 50 #endif // CC_BLINK_WEB_COMPOSITOR_ANIMATION_PLAYER_IMPL_H_ | |
| OLD | NEW |