| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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_GFX_COMPOSITOR_LAYER_PROPERTY_SETTER_H_ | 5 #ifndef UI_GFX_COMPOSITOR_LAYER_PROPERTY_SETTER_H_ |
| 6 #define UI_GFX_COMPOSITOR_LAYER_PROPERTY_SETTER_H_ | 6 #define UI_GFX_COMPOSITOR_LAYER_PROPERTY_SETTER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "views/views_api.h" | 9 #include "views/views_export.h" |
| 10 | 10 |
| 11 namespace gfx { | 11 namespace gfx { |
| 12 class Rect; | 12 class Rect; |
| 13 } | 13 } |
| 14 | 14 |
| 15 namespace ui { | 15 namespace ui { |
| 16 class Layer; | 16 class Layer; |
| 17 class Transform; | 17 class Transform; |
| 18 } | 18 } |
| 19 | 19 |
| 20 namespace views { | 20 namespace views { |
| 21 | 21 |
| 22 // When a property of layer needs to be changed it is set by way of | 22 // When a property of layer needs to be changed it is set by way of |
| 23 // LayerPropertySetter. This enables LayerPropertySetter to animate property | 23 // LayerPropertySetter. This enables LayerPropertySetter to animate property |
| 24 // changes. | 24 // changes. |
| 25 class VIEWS_API LayerPropertySetter { | 25 class VIEWS_EXPORT LayerPropertySetter { |
| 26 public: | 26 public: |
| 27 // Creates a LayerPropertySetter that immediately sets the values on the | 27 // Creates a LayerPropertySetter that immediately sets the values on the |
| 28 // layer. Ownership returns to caller. | 28 // layer. Ownership returns to caller. |
| 29 static LayerPropertySetter* CreateDefaultSetter(); | 29 static LayerPropertySetter* CreateDefaultSetter(); |
| 30 | 30 |
| 31 // Creates a LayerPropertySetter that animates changes. Ownership returns to | 31 // Creates a LayerPropertySetter that animates changes. Ownership returns to |
| 32 // caller. | 32 // caller. |
| 33 static LayerPropertySetter* CreateAnimatingSetter(); | 33 static LayerPropertySetter* CreateAnimatingSetter(); |
| 34 | 34 |
| 35 virtual ~LayerPropertySetter() {} | 35 virtual ~LayerPropertySetter() {} |
| (...skipping 10 matching lines...) Expand all Loading... |
| 46 virtual void SetTransform(ui::Layer* layer, | 46 virtual void SetTransform(ui::Layer* layer, |
| 47 const ui::Transform& transform) = 0; | 47 const ui::Transform& transform) = 0; |
| 48 | 48 |
| 49 // Sets the bounds of the layer. | 49 // Sets the bounds of the layer. |
| 50 virtual void SetBounds(ui::Layer* layer, const gfx::Rect& bounds) = 0; | 50 virtual void SetBounds(ui::Layer* layer, const gfx::Rect& bounds) = 0; |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 } // namespace views | 53 } // namespace views |
| 54 | 54 |
| 55 #endif // UI_GFX_COMPOSITOR_LAYER_PROPERTY_SETTER_H_ | 55 #endif // UI_GFX_COMPOSITOR_LAYER_PROPERTY_SETTER_H_ |
| OLD | NEW |