Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3310)

Unified Diff: android_webview/native/aw_contents.h

Issue 11823027: [Android WebView] Implement the capture picture API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: new approach without ExternalPictureData. Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: android_webview/native/aw_contents.h
diff --git a/android_webview/native/aw_contents.h b/android_webview/native/aw_contents.h
index 6d0248281d85c58371d218c7d1fca0a16df97a71..2b0b79fab7e6f2a9c5fa527999fdeb90a8bd58fe 100644
--- a/android_webview/native/aw_contents.h
+++ b/android_webview/native/aw_contents.h
@@ -16,6 +16,8 @@
#include "base/memory/scoped_ptr.h"
#include "content/public/browser/android/compositor.h"
#include "content/public/browser/javascript_dialogs.h"
+#include "skia/ext/refptr.h"
+#include "third_party/skia/include/core/SkPicture.h"
typedef void* EGLContext;
class TabContents;
@@ -101,6 +103,12 @@ class AwContents : public FindHelper::Listener,
void SetScrollForHWFrame(JNIEnv* env, jobject obj,
int scroll_x, int scroll_y);
void FocusFirstNode(JNIEnv* env, jobject obj);
+ base::android::ScopedJavaLocalRef<jobject> CapturePicture(JNIEnv* env,
+ jobject obj);
+ void EnableOnNewPicture(JNIEnv* env,
+ jobject obj,
+ jboolean enabled,
+ jboolean invalidation_only);
// Geolocation API support
void OnGeolocationShowPrompt(int render_process_id,
@@ -133,6 +141,10 @@ class AwContents : public FindHelper::Listener,
// AwRenderViewHostExt::Client implementation.
virtual void OnPictureUpdated(int process_id, int render_view_id) OVERRIDE;
+ // Returns the latest locally available picture if any.
+ // If none is available will synchronously request the latest one.
joth 2013/01/12 02:36:28 .. and block until the result is received. (I know
Leandro GraciĆ” Gil 2013/01/12 17:59:14 Done.
+ skia::RefPtr<SkPicture> GetLastCapturedPicture();
+
private:
void Invalidate();
void SetWebContents(content::WebContents* web_contents);
@@ -157,6 +169,8 @@ class AwContents : public FindHelper::Listener,
bool view_visible_;
bool compositor_visible_;
bool is_composite_pending_;
+ bool on_new_picture_enabled_;
+ bool on_new_picture_invalidation_only_;
// Used only for detecting Android View System context changes.
// Not to be used between draw calls.

Powered by Google App Engine
This is Rietveld 408576698