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

Side by Side Diff: ui/gfx/compositor/dummy_layer_animation_delegate.cc

Issue 8395046: Allows observers to be notified when layer animations complete. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address reviewer comments. Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 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 #include "ui/gfx/compositor/dummy_layer_animation_delegate.h"
6
7 namespace ui {
8
9 DummyLayerAnimationDelegate::DummyLayerAnimationDelegate() : opacity_(1.0f) {
10 }
11
12 DummyLayerAnimationDelegate::DummyLayerAnimationDelegate(
13 const LayerAnimationDelegate& other)
14 : bounds_(other.GetBoundsForAnimation()),
15 transform_(other.GetTransformForAnimation()),
16 opacity_(other.GetOpacityForAnimation()) {
17 }
18
19 DummyLayerAnimationDelegate::~DummyLayerAnimationDelegate() {
20 }
21
22 void DummyLayerAnimationDelegate::SetBoundsFromAnimation(
23 const gfx::Rect& bounds) {
24 bounds_ = bounds;
25 }
26
27 void DummyLayerAnimationDelegate::SetTransformFromAnimation(
28 const Transform& transform) {
29 transform_ = transform;
30 }
31
32 void DummyLayerAnimationDelegate::SetOpacityFromAnimation(float opacity) {
33 opacity_ = opacity;
34 }
35
36 void DummyLayerAnimationDelegate::ScheduleDrawForAnimation() {
37 }
38
39 const gfx::Rect& DummyLayerAnimationDelegate::GetBoundsForAnimation() const {
40 return bounds_;
41 }
42
43 const Transform& DummyLayerAnimationDelegate::GetTransformForAnimation() const {
44 return transform_;
45 }
46
47 float DummyLayerAnimationDelegate::GetOpacityForAnimation() const {
48 return opacity_;
49 }
50
51 void DummyLayerAnimationDelegate::OnLayerAnimationEnded(
52 LayerAnimationSequence* sequence) {
53 }
54
55 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698