| 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" |
| 11 #include "ui/gfx/geometry/vector2d_f.h" | 11 #include "ui/gfx/geometry/vector2d_f.h" |
| 12 | 12 |
| 13 namespace android_webview { | 13 namespace android_webview { |
| 14 struct ParentCompositorDrawConstraints; |
| 14 | 15 |
| 15 class BrowserViewRendererClient { | 16 class BrowserViewRendererClient { |
| 16 public: | 17 public: |
| 17 // Request DrawGL to be in called AwDrawGLInfo::kModeProcess type. | 18 // Request DrawGL to be in called AwDrawGLInfo::kModeProcess type. |
| 18 // |wait_for_completion| will cause the call to block until DrawGL has | 19 // |wait_for_completion| will cause the call to block until DrawGL has |
| 19 // happened. The callback may never be made, and the mode may be promoted to | 20 // happened. The callback may never be made, and the mode may be promoted to |
| 20 // kModeDraw. | 21 // kModeDraw. |
| 21 virtual bool RequestDrawGL(bool wait_for_completion) = 0; | 22 virtual bool RequestDrawGL(bool wait_for_completion) = 0; |
| 22 | 23 |
| 23 // Called when a new Picture is available. Needs to be enabled | 24 // Called when a new Picture is available. Needs to be enabled |
| (...skipping 23 matching lines...) Expand all Loading... |
| 47 // to |min_page_scale_factor|..|max_page_scale_factor|. | 48 // to |min_page_scale_factor|..|max_page_scale_factor|. |
| 48 virtual void UpdateScrollState(gfx::Vector2d max_scroll_offset, | 49 virtual void UpdateScrollState(gfx::Vector2d max_scroll_offset, |
| 49 gfx::SizeF contents_size_dip, | 50 gfx::SizeF contents_size_dip, |
| 50 float page_scale_factor, | 51 float page_scale_factor, |
| 51 float min_page_scale_factor, | 52 float min_page_scale_factor, |
| 52 float max_page_scale_factor) = 0; | 53 float max_page_scale_factor) = 0; |
| 53 | 54 |
| 54 // Handle overscroll. | 55 // Handle overscroll. |
| 55 virtual void DidOverscroll(gfx::Vector2d overscroll_delta) = 0; | 56 virtual void DidOverscroll(gfx::Vector2d overscroll_delta) = 0; |
| 56 | 57 |
| 58 // Visible for testing |
| 59 // Called when the parent draw constraints in browser view renderer gets |
| 60 // updated. |
| 61 virtual void ParentDrawConstraintsUpdated( |
| 62 const ParentCompositorDrawConstraints& draw_constraints) = 0; |
| 63 |
| 57 protected: | 64 protected: |
| 58 virtual ~BrowserViewRendererClient() {} | 65 virtual ~BrowserViewRendererClient() {} |
| 59 }; | 66 }; |
| 60 | 67 |
| 61 } // namespace android_webview | 68 } // namespace android_webview |
| 62 | 69 |
| 63 #endif // ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_CLIENT_H_ | 70 #endif // ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_CLIENT_H_ |
| OLD | NEW |