[NaCl SDK]: use standard __BEGIN_DECLS macros in sys/select.h
[chromium-blink-merge.git] / cc / blink / web_to_cc_animation_delegate_adapter.cc
blob840cd4ff9d893c098937380821f2a415bbaabe0e
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.
5 #include "cc/blink/web_to_cc_animation_delegate_adapter.h"
6 #include "third_party/WebKit/public/platform/WebCompositorAnimationDelegate.h"
8 namespace cc_blink {
10 WebToCCAnimationDelegateAdapter::WebToCCAnimationDelegateAdapter(
11 blink::WebCompositorAnimationDelegate* delegate)
12 : delegate_(delegate) {
15 void WebToCCAnimationDelegateAdapter::NotifyAnimationStarted(
16 base::TimeTicks monotonic_time,
17 cc::Animation::TargetProperty target_property) {
18 delegate_->notifyAnimationStarted(
19 (monotonic_time - base::TimeTicks()).InSecondsF(),
20 static_cast<blink::WebCompositorAnimation::TargetProperty>(
21 target_property));
24 void WebToCCAnimationDelegateAdapter::NotifyAnimationFinished(
25 base::TimeTicks monotonic_time,
26 cc::Animation::TargetProperty target_property) {
27 delegate_->notifyAnimationFinished(
28 (monotonic_time - base::TimeTicks()).InSecondsF(),
29 static_cast<blink::WebCompositorAnimation::TargetProperty>(
30 target_property));
33 } // namespace cc_blink