Roll src/third_party/WebKit eac3800:0237a66 (svn 202606:202607)
[chromium-blink-merge.git] / chrome / browser / android / favicon_helper.h
blob5b6158f69dfd95c4978af442fc64d9644c072869
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_
8 #include <jni.h>
10 #include "base/android/scoped_java_ref.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/task/cancelable_task_tracker.h"
14 class FaviconHelper {
15 public:
16 FaviconHelper();
17 void Destroy(JNIEnv* env, jobject obj);
18 jboolean GetLocalFaviconImageForURL(JNIEnv* env,
19 jobject obj,
20 jobject j_profile,
21 jstring j_page_url,
22 jint j_icon_types,
23 jint j_desired_size_in_pixel,
24 jobject j_favicon_image_callback);
25 base::android::ScopedJavaLocalRef<jobject> GetSyncedFaviconImageForURL(
26 JNIEnv* env,
27 jobject obj,
28 jobject jprofile,
29 jstring j_page_url);
30 void EnsureFaviconIsAvailable(JNIEnv* env,
31 jobject obj,
32 jobject j_profile,
33 jobject j_web_contents,
34 jstring j_page_url,
35 jstring j_favicon_url,
36 jobject j_availability_callback);
37 static bool RegisterFaviconHelper(JNIEnv* env);
39 private:
40 scoped_ptr<base::CancelableTaskTracker> cancelable_task_tracker_;
42 virtual ~FaviconHelper();
44 DISALLOW_COPY_AND_ASSIGN(FaviconHelper);
47 #endif // CHROME_BROWSER_ANDROID_FAVICON_HELPER_H_