diff options
author | leandrogracia@chromium.org <leandrogracia@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-13 03:30:39 +0000 |
---|---|---|
committer | leandrogracia@chromium.org <leandrogracia@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-13 03:30:39 +0000 |
commit | 7835b0eb6dd2a49c19e12c45ecd301508e626195 (patch) | |
tree | f67d645ec851c68e4a6b54a381c21e36a5486e57 /content/public/renderer | |
parent | 768c8ac24488b949f2d3a00450a49ee14a71cc5a (diff) | |
download | chromium_src-7835b0eb6dd2a49c19e12c45ecd301508e626195.zip chromium_src-7835b0eb6dd2a49c19e12c45ecd301508e626195.tar.gz chromium_src-7835b0eb6dd2a49c19e12c45ecd301508e626195.tar.bz2 |
Expose the capturePicture feature in RenderView for Android WebView legacy API support.
These methods are required to implement WebView.capturePicture and WebView.PictureListener.onNewPicture.
- http://developer.android.com/reference/android/webkit/WebView.html#capturePicture()
- http://developer.android.com/reference/android/webkit/WebView.PictureListener.html
BUG=167908,167913
Review URL: https://chromiumcodereview.appspot.com/11861008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182106 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/public/renderer')
-rw-r--r-- | content/public/renderer/render_view.h | 12 | ||||
-rw-r--r-- | content/public/renderer/render_view_observer.h | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/content/public/renderer/render_view.h b/content/public/renderer/render_view.h index 5cf2af9..f60847b 100644 --- a/content/public/renderer/render_view.h +++ b/content/public/renderer/render_view.h @@ -9,10 +9,13 @@ #include "base/string16.h" #include "content/common/content_export.h" #include "ipc/ipc_sender.h" +#include "skia/ext/refptr.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebNavigationPolicy.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebPageVisibilityState.h" #include "ui/gfx/native_widget_types.h" +class SkPicture; + namespace webkit_glue { struct WebPreferences; } @@ -163,6 +166,15 @@ class CONTENT_EXPORT RenderView : public IPC::Sender { // Returns a collection of security info about |frame|. virtual SSLStatus GetSSLStatusOfFrame(WebKit::WebFrame* frame) const = 0; +#if defined(OS_ANDROID) + // Returns a SkPicture with the full contents of the current frame as part of + // the legacy Android WebView capture picture API. As it involves playing back + // all the drawing commands of the current frame it can have an important + // performance impact and should not be used for other purposes. + // Requires enabling the impl-side painting feature in the compositor. + virtual skia::RefPtr<SkPicture> CapturePicture() = 0; +#endif + protected: virtual ~RenderView() {} }; diff --git a/content/public/renderer/render_view_observer.h b/content/public/renderer/render_view_observer.h index 48faa78..c6bd608 100644 --- a/content/public/renderer/render_view_observer.h +++ b/content/public/renderer/render_view_observer.h @@ -85,6 +85,7 @@ class CONTENT_EXPORT RenderViewObserver : public IPC::Listener, virtual void DidRequestShowContextMenu( WebKit::WebFrame* frame, const WebKit::WebContextMenuData& data) {} + virtual void DidCommitCompositorFrame() {} // These match the RenderView methods. virtual void DidHandleMouseEvent(const WebKit::WebMouseEvent& event) {} |