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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_ANDROID_FAVICON_HELPER_H_
6 #define CHROME_BROWSER_ANDROID_FAVICON_HELPER_H_
10 #include "base/android/scoped_java_ref.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/task/cancelable_task_tracker.h"
17 void Destroy(JNIEnv
* env
, jobject obj
);
18 jboolean
GetLocalFaviconImageForURL(JNIEnv
* env
,
23 jint j_desired_size_in_pixel
,
24 jobject j_favicon_image_callback
);
25 void GetLargestRawFaviconForUrl(JNIEnv
* env
,
29 jintArray j_icon_types
,
30 jint j_min_size_threshold_px
,
31 jobject j_favicon_image_callback
);
32 base::android::ScopedJavaLocalRef
<jobject
> GetSyncedFaviconImageForURL(
37 void EnsureFaviconIsAvailable(JNIEnv
* env
,
40 jobject j_web_contents
,
42 jstring j_favicon_url
,
43 jobject j_availability_callback
);
44 static bool RegisterFaviconHelper(JNIEnv
* env
);
47 scoped_ptr
<base::CancelableTaskTracker
> cancelable_task_tracker_
;
49 virtual ~FaviconHelper();
51 DISALLOW_COPY_AND_ASSIGN(FaviconHelper
);
54 #endif // CHROME_BROWSER_ANDROID_FAVICON_HELPER_H_