| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_CLIENT_H_ | 5 #ifndef ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_CLIENT_H_ |
| 6 #define ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_CLIENT_H_ | 6 #define ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_CLIENT_H_ |
| 7 | 7 |
| 8 #include "base/android/scoped_java_ref.h" | 8 #include "base/android/scoped_java_ref.h" |
| 9 #include "ui/gfx/geometry/point.h" | 9 #include "ui/gfx/geometry/point.h" |
| 10 #include "ui/gfx/geometry/size_f.h" | 10 #include "ui/gfx/geometry/size_f.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 // synchronize draw functor destruction. | 34 // synchronize draw functor destruction. |
| 35 virtual void DetachFunctorFromView() = 0; | 35 virtual void DetachFunctorFromView() = 0; |
| 36 | 36 |
| 37 // Called to get view's absolute location on the screen. | 37 // Called to get view's absolute location on the screen. |
| 38 virtual gfx::Point GetLocationOnScreen() = 0; | 38 virtual gfx::Point GetLocationOnScreen() = 0; |
| 39 | 39 |
| 40 // Try to set the view's scroll offset to |new_value|. | 40 // Try to set the view's scroll offset to |new_value|. |
| 41 virtual void ScrollContainerViewTo(gfx::Vector2d new_value) = 0; | 41 virtual void ScrollContainerViewTo(gfx::Vector2d new_value) = 0; |
| 42 | 42 |
| 43 // Is a Android view system managed fling in progress? | 43 // Is a Android view system managed fling in progress? |
| 44 virtual bool IsFlingActive() const = 0; | 44 virtual bool IsSmoothScrollingActive() const = 0; |
| 45 | 45 |
| 46 // Sets the following: | 46 // Sets the following: |
| 47 // view's scroll offset cap to |max_scroll_offset|, | 47 // view's scroll offset cap to |max_scroll_offset|, |
| 48 // current contents_size to |contents_size_dip|, | 48 // current contents_size to |contents_size_dip|, |
| 49 // the current page scale to |page_scale_factor| and page scale limits | 49 // the current page scale to |page_scale_factor| and page scale limits |
| 50 // to |min_page_scale_factor|..|max_page_scale_factor|. | 50 // to |min_page_scale_factor|..|max_page_scale_factor|. |
| 51 virtual void UpdateScrollState(gfx::Vector2d max_scroll_offset, | 51 virtual void UpdateScrollState(gfx::Vector2d max_scroll_offset, |
| 52 gfx::SizeF contents_size_dip, | 52 gfx::SizeF contents_size_dip, |
| 53 float page_scale_factor, | 53 float page_scale_factor, |
| 54 float min_page_scale_factor, | 54 float min_page_scale_factor, |
| 55 float max_page_scale_factor) = 0; | 55 float max_page_scale_factor) = 0; |
| 56 | 56 |
| 57 // Handle overscroll. | 57 // Handle overscroll. |
| 58 virtual void DidOverscroll(gfx::Vector2d overscroll_delta) = 0; | 58 virtual void DidOverscroll(gfx::Vector2d overscroll_delta, |
| 59 gfx::Vector2dF overscroll_velocity) = 0; |
| 59 | 60 |
| 60 // Visible for testing | 61 // Visible for testing |
| 61 // Called when the parent draw constraints in browser view renderer gets | 62 // Called when the parent draw constraints in browser view renderer gets |
| 62 // updated. | 63 // updated. |
| 63 virtual void ParentDrawConstraintsUpdated( | 64 virtual void ParentDrawConstraintsUpdated( |
| 64 const ParentCompositorDrawConstraints& draw_constraints) = 0; | 65 const ParentCompositorDrawConstraints& draw_constraints) = 0; |
| 65 | 66 |
| 66 protected: | 67 protected: |
| 67 virtual ~BrowserViewRendererClient() {} | 68 virtual ~BrowserViewRendererClient() {} |
| 68 }; | 69 }; |
| 69 | 70 |
| 70 } // namespace android_webview | 71 } // namespace android_webview |
| 71 | 72 |
| 72 #endif // ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_CLIENT_H_ | 73 #endif // ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_CLIENT_H_ |
| OLD | NEW |