OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_ANDROID_H_ | 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_ANDROID_H_ |
6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_ANDROID_H_ | 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_ANDROID_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 void ReloadLoFiImages(JNIEnv* env, | 183 void ReloadLoFiImages(JNIEnv* env, |
184 const base::android::JavaParamRef<jobject>& obj); | 184 const base::android::JavaParamRef<jobject>& obj); |
185 | 185 |
186 void set_synchronous_compositor_client(SynchronousCompositorClient* client) { | 186 void set_synchronous_compositor_client(SynchronousCompositorClient* client) { |
187 synchronous_compositor_client_ = client; | 187 synchronous_compositor_client_ = client; |
188 } | 188 } |
189 SynchronousCompositorClient* synchronous_compositor_client() const { | 189 SynchronousCompositorClient* synchronous_compositor_client() const { |
190 return synchronous_compositor_client_; | 190 return synchronous_compositor_client_; |
191 } | 191 } |
192 | 192 |
| 193 void DownloadImage(JNIEnv* env, |
| 194 const base::android::JavaParamRef<jobject>& obj, |
| 195 const base::android::JavaParamRef<jstring>& url, |
| 196 jboolean is_fav_icon, |
| 197 jint max_bitmap_size, |
| 198 jboolean bypass_cache, |
| 199 const base::android::JavaParamRef<jobject>& jcallback); |
| 200 |
193 private: | 201 private: |
194 RenderWidgetHostViewAndroid* GetRenderWidgetHostViewAndroid(); | 202 RenderWidgetHostViewAndroid* GetRenderWidgetHostViewAndroid(); |
195 | 203 |
196 void OnFinishGetContentBitmap( | 204 void OnFinishGetContentBitmap( |
197 base::android::ScopedJavaGlobalRef<jobject>* obj, | 205 base::android::ScopedJavaGlobalRef<jobject>* obj, |
198 base::android::ScopedJavaGlobalRef<jobject>* callback, | 206 base::android::ScopedJavaGlobalRef<jobject>* callback, |
199 const SkBitmap& bitmap, | 207 const SkBitmap& bitmap, |
200 ReadbackResponse response); | 208 ReadbackResponse response); |
201 | 209 |
| 210 void OnFinishDownloadImage( |
| 211 base::android::ScopedJavaGlobalRef<jobject>* obj, |
| 212 base::android::ScopedJavaGlobalRef<jobject>* callback, |
| 213 int id, |
| 214 int http_status_code, |
| 215 const GURL& url, |
| 216 const std::vector<SkBitmap>& bitmaps, |
| 217 const std::vector<gfx::Size>& sizes); |
| 218 |
202 WebContentsImpl* web_contents_; | 219 WebContentsImpl* web_contents_; |
203 NavigationControllerAndroid navigation_controller_; | 220 NavigationControllerAndroid navigation_controller_; |
204 base::android::ScopedJavaGlobalRef<jobject> obj_; | 221 base::android::ScopedJavaGlobalRef<jobject> obj_; |
205 SynchronousCompositorClient* synchronous_compositor_client_; | 222 SynchronousCompositorClient* synchronous_compositor_client_; |
206 | 223 |
207 base::WeakPtrFactory<WebContentsAndroid> weak_factory_; | 224 base::WeakPtrFactory<WebContentsAndroid> weak_factory_; |
208 | 225 |
209 DISALLOW_COPY_AND_ASSIGN(WebContentsAndroid); | 226 DISALLOW_COPY_AND_ASSIGN(WebContentsAndroid); |
210 }; | 227 }; |
211 | 228 |
212 } // namespace content | 229 } // namespace content |
213 | 230 |
214 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_ANDROID_H_ | 231 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_ANDROID_H_ |
OLD | NEW |