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

Side by Side Diff: ui/compositor/test/test_layer_animation_delegate.h

Issue 1531913003: CC Animations: Make ui::LayerAnimator a LayerAnimationEventObserver (instead of ui::Layer) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix LayerAnimator::SetDelegate Created 5 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_COMPOSITOR_TEST_TEST_LAYER_ANIMATION_DELEGATE_H_ 5 #ifndef UI_COMPOSITOR_TEST_TEST_LAYER_ANIMATION_DELEGATE_H_
6 #define UI_COMPOSITOR_TEST_TEST_LAYER_ANIMATION_DELEGATE_H_ 6 #define UI_COMPOSITOR_TEST_TEST_LAYER_ANIMATION_DELEGATE_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "cc/layers/layer.h"
9 #include "ui/compositor/layer_animation_delegate.h" 10 #include "ui/compositor/layer_animation_delegate.h"
10 #include "ui/gfx/geometry/rect.h" 11 #include "ui/gfx/geometry/rect.h"
11 #include "ui/gfx/transform.h" 12 #include "ui/gfx/transform.h"
12 13
13 namespace ui { 14 namespace ui {
14 15
15 class TestLayerAnimationDelegate : public LayerAnimationDelegate { 16 class TestLayerAnimationDelegate : public LayerAnimationDelegate {
16 public: 17 public:
17 TestLayerAnimationDelegate(); 18 TestLayerAnimationDelegate();
18 explicit TestLayerAnimationDelegate(const LayerAnimationDelegate& other); 19 explicit TestLayerAnimationDelegate(const LayerAnimationDelegate& other);
(...skipping 12 matching lines...) Expand all
31 gfx::Transform GetTransformForAnimation() const override; 32 gfx::Transform GetTransformForAnimation() const override;
32 float GetOpacityForAnimation() const override; 33 float GetOpacityForAnimation() const override;
33 bool GetVisibilityForAnimation() const override; 34 bool GetVisibilityForAnimation() const override;
34 float GetBrightnessForAnimation() const override; 35 float GetBrightnessForAnimation() const override;
35 float GetGrayscaleForAnimation() const override; 36 float GetGrayscaleForAnimation() const override;
36 SkColor GetColorForAnimation() const override; 37 SkColor GetColorForAnimation() const override;
37 float GetDeviceScaleFactor() const override; 38 float GetDeviceScaleFactor() const override;
38 void AddThreadedAnimation(scoped_ptr<cc::Animation> animation) override; 39 void AddThreadedAnimation(scoped_ptr<cc::Animation> animation) override;
39 void RemoveThreadedAnimation(int animation_id) override; 40 void RemoveThreadedAnimation(int animation_id) override;
40 LayerAnimatorCollection* GetLayerAnimatorCollection() override; 41 LayerAnimatorCollection* GetLayerAnimatorCollection() override;
42 cc::Layer* GetCcLayer() const override;
41 43
42 private: 44 private:
45 void CreateCcLayer();
46
43 gfx::Rect bounds_; 47 gfx::Rect bounds_;
44 gfx::Transform transform_; 48 gfx::Transform transform_;
45 float opacity_; 49 float opacity_;
46 bool visibility_; 50 bool visibility_;
47 float brightness_; 51 float brightness_;
48 float grayscale_; 52 float grayscale_;
49 SkColor color_; 53 SkColor color_;
54 scoped_refptr<cc::Layer> cc_layer_;
50 55
51 // Allow copy and assign. 56 // Allow copy and assign.
52 }; 57 };
53 58
54 } // namespace ui 59 } // namespace ui
55 60
56 #endif // UI_COMPOSITOR_TEST_TEST_LAYER_ANIMATION_DELEGATE_H_ 61 #endif // UI_COMPOSITOR_TEST_TEST_LAYER_ANIMATION_DELEGATE_H_
OLDNEW
« no previous file with comments | « ui/compositor/layer_animator_unittest.cc ('k') | ui/compositor/test/test_layer_animation_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698