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

Unified Diff: content/browser/web_contents/web_contents_android.h

Issue 2014553002: Implement WebContents.downloadImage() on Java side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebasing Created 4 years, 7 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: content/browser/web_contents/web_contents_android.h
diff --git a/content/browser/web_contents/web_contents_android.h b/content/browser/web_contents/web_contents_android.h
index 7c890c351b6717febffcb49b22a9ae210ff0cda4..501e67c3dda51e3db8243743d22d884ec94670aa 100644
--- a/content/browser/web_contents/web_contents_android.h
+++ b/content/browser/web_contents/web_contents_android.h
@@ -190,6 +190,14 @@ class CONTENT_EXPORT WebContentsAndroid
return synchronous_compositor_client_;
}
+ void DownloadImage(JNIEnv* env,
+ const base::android::JavaParamRef<jobject>& obj,
+ const base::android::JavaParamRef<jstring>& url,
+ jboolean is_fav_icon,
+ jint max_bitmap_size,
+ jboolean bypass_cache,
+ const base::android::JavaParamRef<jobject>& jcallback);
+
private:
RenderWidgetHostViewAndroid* GetRenderWidgetHostViewAndroid();
@@ -199,6 +207,15 @@ class CONTENT_EXPORT WebContentsAndroid
const SkBitmap& bitmap,
ReadbackResponse response);
+ void OnFinishDownloadImage(
+ base::android::ScopedJavaGlobalRef<jobject>* obj,
+ base::android::ScopedJavaGlobalRef<jobject>* callback,
+ int id,
+ int http_status_code,
+ const GURL& url,
+ const std::vector<SkBitmap>& bitmaps,
+ const std::vector<gfx::Size>& sizes);
+
WebContentsImpl* web_contents_;
NavigationControllerAndroid navigation_controller_;
base::android::ScopedJavaGlobalRef<jobject> obj_;

Powered by Google App Engine
This is Rietveld 408576698