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

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

Issue 11145005: Migrate ui::Transform to gfx::Transform (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Hopefully should work this time Created 8 years, 2 months 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
« no previous file with comments | « ui/compositor/layer_unittest.cc ('k') | ui/compositor/test/test_layer_animation_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ui/compositor/layer_animation_delegate.h" 9 #include "ui/compositor/layer_animation_delegate.h"
10 #include "ui/gfx/rect.h" 10 #include "ui/gfx/rect.h"
11 #include "ui/gfx/transform.h" 11 #include "ui/gfx/transform.h"
12 12
13 namespace ui { 13 namespace ui {
14 14
15 class TestLayerAnimationDelegate : public LayerAnimationDelegate { 15 class TestLayerAnimationDelegate : public LayerAnimationDelegate {
16 public: 16 public:
17 TestLayerAnimationDelegate(); 17 TestLayerAnimationDelegate();
18 explicit TestLayerAnimationDelegate(const LayerAnimationDelegate& other); 18 explicit TestLayerAnimationDelegate(const LayerAnimationDelegate& other);
19 virtual ~TestLayerAnimationDelegate(); 19 virtual ~TestLayerAnimationDelegate();
20 20
21 // Implementation of LayerAnimationDelegate 21 // Implementation of LayerAnimationDelegate
22 virtual void SetBoundsFromAnimation(const gfx::Rect& bounds) OVERRIDE; 22 virtual void SetBoundsFromAnimation(const gfx::Rect& bounds) OVERRIDE;
23 virtual void SetTransformFromAnimation(const Transform& transform) OVERRIDE; 23 virtual void SetTransformFromAnimation(
24 const gfx::Transform& transform) OVERRIDE;
24 virtual void SetOpacityFromAnimation(float opacity) OVERRIDE; 25 virtual void SetOpacityFromAnimation(float opacity) OVERRIDE;
25 virtual void SetVisibilityFromAnimation(bool visibility) OVERRIDE; 26 virtual void SetVisibilityFromAnimation(bool visibility) OVERRIDE;
26 virtual void SetBrightnessFromAnimation(float brightness) OVERRIDE; 27 virtual void SetBrightnessFromAnimation(float brightness) OVERRIDE;
27 virtual void SetGrayscaleFromAnimation(float grayscale) OVERRIDE; 28 virtual void SetGrayscaleFromAnimation(float grayscale) OVERRIDE;
28 virtual void SetColorFromAnimation(SkColor color) OVERRIDE; 29 virtual void SetColorFromAnimation(SkColor color) OVERRIDE;
29 virtual void ScheduleDrawForAnimation() OVERRIDE; 30 virtual void ScheduleDrawForAnimation() OVERRIDE;
30 virtual const gfx::Rect& GetBoundsForAnimation() const OVERRIDE; 31 virtual const gfx::Rect& GetBoundsForAnimation() const OVERRIDE;
31 virtual const Transform& GetTransformForAnimation() const OVERRIDE; 32 virtual const gfx::Transform& GetTransformForAnimation() const OVERRIDE;
32 virtual float GetOpacityForAnimation() const OVERRIDE; 33 virtual float GetOpacityForAnimation() const OVERRIDE;
33 virtual bool GetVisibilityForAnimation() const OVERRIDE; 34 virtual bool GetVisibilityForAnimation() const OVERRIDE;
34 virtual float GetBrightnessForAnimation() const OVERRIDE; 35 virtual float GetBrightnessForAnimation() const OVERRIDE;
35 virtual float GetGrayscaleForAnimation() const OVERRIDE; 36 virtual float GetGrayscaleForAnimation() const OVERRIDE;
36 virtual SkColor GetColorForAnimation() const OVERRIDE; 37 virtual SkColor GetColorForAnimation() const OVERRIDE;
37 38
38 private: 39 private:
39 gfx::Rect bounds_; 40 gfx::Rect bounds_;
40 Transform transform_; 41 gfx::Transform transform_;
41 float opacity_; 42 float opacity_;
42 bool visibility_; 43 bool visibility_;
43 float brightness_; 44 float brightness_;
44 float grayscale_; 45 float grayscale_;
45 SkColor color_; 46 SkColor color_;
46 47
47 // Allow copy and assign. 48 // Allow copy and assign.
48 }; 49 };
49 50
50 } // namespace ui 51 } // namespace ui
51 52
52 #endif // UI_COMPOSITOR_TEST_TEST_LAYER_ANIMATION_DELEGATE_H_ 53 #endif // UI_COMPOSITOR_TEST_TEST_LAYER_ANIMATION_DELEGATE_H_
OLDNEW
« no previous file with comments | « ui/compositor/layer_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