| 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 CHROME_BROWSER_ANDROID_FAVICON_HELPER_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_FAVICON_HELPER_H_ |
| 6 #define CHROME_BROWSER_ANDROID_FAVICON_HELPER_H_ | 6 #define CHROME_BROWSER_ANDROID_FAVICON_HELPER_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 | 9 |
| 10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/task/cancelable_task_tracker.h" | 12 #include "base/task/cancelable_task_tracker.h" |
| 13 | 13 |
| 14 class FaviconHelper { | 14 class FaviconHelper { |
| 15 public: | 15 public: |
| 16 FaviconHelper(); | 16 FaviconHelper(); |
| 17 void Destroy(JNIEnv* env, jobject obj); | 17 void Destroy(JNIEnv* env, jobject obj); |
| 18 jboolean GetLocalFaviconImageForURL(JNIEnv* env, | 18 jboolean GetLocalFaviconImageForURL(JNIEnv* env, |
| 19 jobject obj, | 19 jobject obj, |
| 20 jobject j_profile, | 20 jobject j_profile, |
| 21 jstring j_page_url, | 21 jstring j_page_url, |
| 22 jint j_icon_types, | 22 jint j_icon_types, |
| 23 jint j_desired_size_in_dip, | 23 jint j_desired_size_in_pixel, |
| 24 jobject j_favicon_image_callback); | 24 jobject j_favicon_image_callback); |
| 25 void GetLargestRawFaviconForUrl(JNIEnv* env, | 25 void GetLargestRawFaviconForUrl(JNIEnv* env, |
| 26 jobject obj, | 26 jobject obj, |
| 27 jobject j_profile, | 27 jobject j_profile, |
| 28 jstring j_page_url, | 28 jstring j_page_url, |
| 29 jintArray j_icon_types, | 29 jintArray j_icon_types, |
| 30 jint j_min_size_threshold_px, | 30 jint j_min_size_threshold_px, |
| 31 jobject j_favicon_image_callback); | 31 jobject j_favicon_image_callback); |
| 32 base::android::ScopedJavaLocalRef<jobject> GetSyncedFaviconImageForURL( | 32 base::android::ScopedJavaLocalRef<jobject> GetSyncedFaviconImageForURL( |
| 33 JNIEnv* env, | 33 JNIEnv* env, |
| 34 jobject obj, | 34 jobject obj, |
| 35 jobject jprofile, | 35 jobject jprofile, |
| 36 jstring j_page_url); | 36 jstring j_page_url); |
| 37 static bool RegisterFaviconHelper(JNIEnv* env); | 37 static bool RegisterFaviconHelper(JNIEnv* env); |
| 38 | 38 |
| 39 private: | 39 private: |
| 40 scoped_ptr<base::CancelableTaskTracker> cancelable_task_tracker_; | 40 scoped_ptr<base::CancelableTaskTracker> cancelable_task_tracker_; |
| 41 | 41 |
| 42 virtual ~FaviconHelper(); | 42 virtual ~FaviconHelper(); |
| 43 | 43 |
| 44 DISALLOW_COPY_AND_ASSIGN(FaviconHelper); | 44 DISALLOW_COPY_AND_ASSIGN(FaviconHelper); |
| 45 }; | 45 }; |
| 46 | 46 |
| 47 #endif // CHROME_BROWSER_ANDROID_FAVICON_HELPER_H_ | 47 #endif // CHROME_BROWSER_ANDROID_FAVICON_HELPER_H_ |
| OLD | NEW |