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 10 matching lines...) Expand all Loading... | |
21 // the mode may be promoted to kModeDraw. | 21 // the mode may be promoted to kModeDraw. |
22 virtual bool RequestDrawGL(jobject canvas, bool wait_for_completion) = 0; | 22 virtual bool RequestDrawGL(jobject canvas, bool wait_for_completion) = 0; |
23 | 23 |
24 // Called when a new Picture is available. Needs to be enabled | 24 // Called when a new Picture is available. Needs to be enabled |
25 // via the EnableOnNewPicture method. | 25 // via the EnableOnNewPicture method. |
26 virtual void OnNewPicture() = 0; | 26 virtual void OnNewPicture() = 0; |
27 | 27 |
28 // Called to trigger view invalidations. | 28 // Called to trigger view invalidations. |
29 virtual void PostInvalidate() = 0; | 29 virtual void PostInvalidate() = 0; |
30 | 30 |
31 // Called to trigger an invalidation on the view, if there is not another | |
32 // invalidate pending and the parent draw constraints in browser view | |
33 // renderer becomes stale. | |
34 virtual void InvalidateOnceIfNeeded() = 0; | |
boliu
2014/07/29 23:50:41
Call this something like "ParentConstraintsUpdated
hush (inactive)
2014/07/30 00:11:32
Renamed it to UpdateParentDrawConstraints. And ren
| |
35 | |
31 // Called to get view's absolute location on the screen. | 36 // Called to get view's absolute location on the screen. |
32 virtual gfx::Point GetLocationOnScreen() = 0; | 37 virtual gfx::Point GetLocationOnScreen() = 0; |
33 | 38 |
34 // Try to set the view's scroll offset to |new_value|. | 39 // Try to set the view's scroll offset to |new_value|. |
35 virtual void ScrollContainerViewTo(gfx::Vector2d new_value) = 0; | 40 virtual void ScrollContainerViewTo(gfx::Vector2d new_value) = 0; |
36 | 41 |
37 // Is a Android view system managed fling in progress? | 42 // Is a Android view system managed fling in progress? |
38 virtual bool IsFlingActive() const = 0; | 43 virtual bool IsFlingActive() const = 0; |
39 | 44 |
40 // Sets the following: | 45 // Sets the following: |
(...skipping 10 matching lines...) Expand all Loading... | |
51 // Handle overscroll. | 56 // Handle overscroll. |
52 virtual void DidOverscroll(gfx::Vector2d overscroll_delta) = 0; | 57 virtual void DidOverscroll(gfx::Vector2d overscroll_delta) = 0; |
53 | 58 |
54 protected: | 59 protected: |
55 virtual ~BrowserViewRendererClient() {} | 60 virtual ~BrowserViewRendererClient() {} |
56 }; | 61 }; |
57 | 62 |
58 } // namespace android_webview | 63 } // namespace android_webview |
59 | 64 |
60 #endif // ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_CLIENT_H_ | 65 #endif // ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_CLIENT_H_ |
OLD | NEW |