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 CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_TO_CC_ANIMATION_DELEGATE_ADAPTER_H_ 6 #define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_TO_CC_ANIMATION_DELEGATE_ADAPTER_H_ 7 8 #include "base/basictypes.h" 9 #include "base/compiler_specific.h" 10 #include "cc/animation/animation_delegate.h" 11 12 namespace blink { 13 class WebAnimationDelegate; 14 } 15 16 namespace content { 17 18 class WebToCCAnimationDelegateAdapter : public cc::AnimationDelegate { 19 public: 20 explicit WebToCCAnimationDelegateAdapter( 21 blink::WebAnimationDelegate* delegate); 22 23 private: 24 virtual void NotifyAnimationStarted( 25 base::TimeTicks monotonic_time, 26 cc::Animation::TargetProperty target_property) OVERRIDE; 27 virtual void NotifyAnimationFinished( 28 base::TimeTicks monotonic_time, 29 cc::Animation::TargetProperty target_property) OVERRIDE; 30 31 blink::WebAnimationDelegate* delegate_; 32 33 DISALLOW_COPY_AND_ASSIGN(WebToCCAnimationDelegateAdapter); 34 }; 35 36 } // namespace content 37 38 #endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_TO_CC_ANIMATION_DELEGATE_ADAPTER_H_ 39 40