OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CC_INPUT_LAYER_SCROLL_OFFSET_DELEGATE_H_ | 5 #ifndef CC_INPUT_LAYER_SCROLL_OFFSET_DELEGATE_H_ |
6 #define CC_INPUT_LAYER_SCROLL_OFFSET_DELEGATE_H_ | 6 #define CC_INPUT_LAYER_SCROLL_OFFSET_DELEGATE_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "ui/gfx/size_f.h" | 9 #include "ui/gfx/size_f.h" |
10 #include "ui/gfx/vector2d_f.h" | 10 #include "ui/gfx/vector2d_f.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 // This is called by the compositor to check whether a delegate-managed fling | 37 // This is called by the compositor to check whether a delegate-managed fling |
38 // is active or not. | 38 // is active or not. |
39 virtual bool IsExternalFlingActive() const = 0; | 39 virtual bool IsExternalFlingActive() const = 0; |
40 | 40 |
41 // This is called by the compositor to notify the delegate what is the current | 41 // This is called by the compositor to notify the delegate what is the current |
42 // page scale factor is. | 42 // page scale factor is. |
43 virtual void SetTotalPageScaleFactor(float page_scale_factor) = 0; | 43 virtual void SetTotalPageScaleFactor(float page_scale_factor) = 0; |
44 | 44 |
45 // This is called by the compositor to notify the delegate what is the layer's | 45 // This is called by the compositor to notify the delegate what is the layer's |
46 // scrollable size is. | 46 // scrollable size is. |
47 virtual void SetScrollableSize(gfx::SizeF scrollable_size) = 0; | 47 virtual void SetScrollableSize(const gfx::SizeF& scrollable_size) = 0; |
48 | 48 |
49 protected: | 49 protected: |
50 LayerScrollOffsetDelegate() {} | 50 LayerScrollOffsetDelegate() {} |
51 virtual ~LayerScrollOffsetDelegate() {} | 51 virtual ~LayerScrollOffsetDelegate() {} |
52 | 52 |
53 private: | 53 private: |
54 DISALLOW_COPY_AND_ASSIGN(LayerScrollOffsetDelegate); | 54 DISALLOW_COPY_AND_ASSIGN(LayerScrollOffsetDelegate); |
55 }; | 55 }; |
56 | 56 |
57 } // namespace cc | 57 } // namespace cc |
58 | 58 |
59 #endif // CC_INPUT_LAYER_SCROLL_OFFSET_DELEGATE_H_ | 59 #endif // CC_INPUT_LAYER_SCROLL_OFFSET_DELEGATE_H_ |
OLD | NEW |