| 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 "base/callback_forward.h" | 9 #include "base/callback_forward.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 // |min_page_scale_factor| page scale lower limit, | 37 // |min_page_scale_factor| page scale lower limit, |
| 38 // |max_page_scale_factor| page scale upper limit. | 38 // |max_page_scale_factor| page scale upper limit. |
| 39 virtual void UpdateRootLayerState( | 39 virtual void UpdateRootLayerState( |
| 40 const gfx::ScrollOffset& total_scroll_offset, | 40 const gfx::ScrollOffset& total_scroll_offset, |
| 41 const gfx::ScrollOffset& max_scroll_offset, | 41 const gfx::ScrollOffset& max_scroll_offset, |
| 42 const gfx::SizeF& scrollable_size, | 42 const gfx::SizeF& scrollable_size, |
| 43 float page_scale_factor, | 43 float page_scale_factor, |
| 44 float min_page_scale_factor, | 44 float min_page_scale_factor, |
| 45 float max_page_scale_factor) = 0; | 45 float max_page_scale_factor) = 0; |
| 46 | 46 |
| 47 // This is called by the compositor to check whether a delegate-managed fling | |
| 48 // is active or not. | |
| 49 // TODO(hush): Remove after WebView's smooth scrolling path is unified with | |
| 50 // Chrome's. | |
| 51 virtual bool IsExternalScrollActive() const = 0; | |
| 52 | |
| 53 // This is called by the compositor when a fling hitting the root layer | 47 // This is called by the compositor when a fling hitting the root layer |
| 54 // requires a scheduled animation update. | 48 // requires a scheduled animation update. |
| 55 typedef base::Callback<void(base::TimeTicks)> AnimationCallback; | 49 typedef base::Callback<void(base::TimeTicks)> AnimationCallback; |
| 56 virtual void SetNeedsAnimate(const AnimationCallback& animation) = 0; | 50 virtual void SetNeedsAnimate(const AnimationCallback& animation) = 0; |
| 57 | 51 |
| 58 protected: | 52 protected: |
| 59 LayerScrollOffsetDelegate() {} | 53 LayerScrollOffsetDelegate() {} |
| 60 virtual ~LayerScrollOffsetDelegate() {} | 54 virtual ~LayerScrollOffsetDelegate() {} |
| 61 | 55 |
| 62 private: | 56 private: |
| 63 DISALLOW_COPY_AND_ASSIGN(LayerScrollOffsetDelegate); | 57 DISALLOW_COPY_AND_ASSIGN(LayerScrollOffsetDelegate); |
| 64 }; | 58 }; |
| 65 | 59 |
| 66 } // namespace cc | 60 } // namespace cc |
| 67 | 61 |
| 68 #endif // CC_INPUT_LAYER_SCROLL_OFFSET_DELEGATE_H_ | 62 #endif // CC_INPUT_LAYER_SCROLL_OFFSET_DELEGATE_H_ |
| OLD | NEW |