Chromium Code Reviews| 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 | 14 |
| 15 class BrowserViewRendererClient { | 15 class BrowserViewRendererClient { |
| 16 public: | 16 public: |
| 17 // Request DrawGL be called. Passing null |canvas| implies the request | 17 // Request DrawGL be called. Passing null |canvas| implies the request |
| 18 // will be of AwDrawGLInfo::kModeProcess type. The callback | 18 // will be of AwDrawGLInfo::kModeProcess type. |wait_for_completion| |
| 19 // may never be made, and the mode may be promoted to kModeDraw. | 19 // will cause the call to block until DrawGL has happened; it does not |
| 20 virtual bool RequestDrawGL(jobject canvas) = 0; | 20 // together with |canvas|. The callback may never be made, and the mode may |
|
hush (inactive)
2014/05/01 00:35:54
do you mean |wait_for_completion| should not be tr
boliu
2014/05/01 00:46:36
Yes. Fixed up comment.
| |
| 21 // be promoted to kModeDraw. | |
| 22 virtual bool RequestDrawGL(jobject canvas, bool wait_for_completion) = 0; | |
| 21 | 23 |
| 22 // Called when a new Picture is available. Needs to be enabled | 24 // Called when a new Picture is available. Needs to be enabled |
| 23 // via the EnableOnNewPicture method. | 25 // via the EnableOnNewPicture method. |
| 24 virtual void OnNewPicture() = 0; | 26 virtual void OnNewPicture() = 0; |
| 25 | 27 |
| 26 // Called to trigger view invalidations. | 28 // Called to trigger view invalidations. |
| 27 virtual void PostInvalidate() = 0; | 29 virtual void PostInvalidate() = 0; |
| 28 | 30 |
| 29 // Called to get view's absolute location on the screen. | 31 // Called to get view's absolute location on the screen. |
| 30 virtual gfx::Point GetLocationOnScreen() = 0; | 32 virtual gfx::Point GetLocationOnScreen() = 0; |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 50 // Handle overscroll. | 52 // Handle overscroll. |
| 51 virtual void DidOverscroll(gfx::Vector2d overscroll_delta) = 0; | 53 virtual void DidOverscroll(gfx::Vector2d overscroll_delta) = 0; |
| 52 | 54 |
| 53 protected: | 55 protected: |
| 54 virtual ~BrowserViewRendererClient() {} | 56 virtual ~BrowserViewRendererClient() {} |
| 55 }; | 57 }; |
| 56 | 58 |
| 57 } // namespace android_webview | 59 } // namespace android_webview |
| 58 | 60 |
| 59 #endif // ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_CLIENT_H_ | 61 #endif // ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_CLIENT_H_ |
| OLD | NEW |