| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_LARGE_ICON_BRIDGE_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_LARGE_ICON_BRIDGE_H_ |
| 6 #define CHROME_BROWSER_ANDROID_LARGE_ICON_BRIDGE_H_ | 6 #define CHROME_BROWSER_ANDROID_LARGE_ICON_BRIDGE_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/macros.h" |
| 11 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/task/cancelable_task_tracker.h" | 13 #include "base/task/cancelable_task_tracker.h" |
| 13 | 14 |
| 14 // The C++ counterpart to Java's LargeIconBridge. Together these classes expose | 15 // The C++ counterpart to Java's LargeIconBridge. Together these classes expose |
| 15 // LargeIconService to Java. | 16 // LargeIconService to Java. |
| 16 class LargeIconBridge { | 17 class LargeIconBridge { |
| 17 public: | 18 public: |
| 18 LargeIconBridge(); | 19 LargeIconBridge(); |
| 19 void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); | 20 void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); |
| 20 jboolean GetLargeIconForURL( | 21 jboolean GetLargeIconForURL( |
| 21 JNIEnv* env, | 22 JNIEnv* env, |
| 22 const base::android::JavaParamRef<jobject>& obj, | 23 const base::android::JavaParamRef<jobject>& obj, |
| 23 const base::android::JavaParamRef<jobject>& j_profile, | 24 const base::android::JavaParamRef<jobject>& j_profile, |
| 24 const base::android::JavaParamRef<jstring>& j_page_url, | 25 const base::android::JavaParamRef<jstring>& j_page_url, |
| 25 jint min_source_size_px, | 26 jint min_source_size_px, |
| 26 const base::android::JavaParamRef<jobject>& j_callback); | 27 const base::android::JavaParamRef<jobject>& j_callback); |
| 27 static bool RegisterLargeIconBridge(JNIEnv* env); | 28 static bool RegisterLargeIconBridge(JNIEnv* env); |
| 28 | 29 |
| 29 private: | 30 private: |
| 30 virtual ~LargeIconBridge(); | 31 virtual ~LargeIconBridge(); |
| 31 | 32 |
| 32 base::CancelableTaskTracker cancelable_task_tracker_; | 33 base::CancelableTaskTracker cancelable_task_tracker_; |
| 33 | 34 |
| 34 DISALLOW_COPY_AND_ASSIGN(LargeIconBridge); | 35 DISALLOW_COPY_AND_ASSIGN(LargeIconBridge); |
| 35 }; | 36 }; |
| 36 | 37 |
| 37 #endif // CHROME_BROWSER_ANDROID_LARGE_ICON_BRIDGE_H_ | 38 #endif // CHROME_BROWSER_ANDROID_LARGE_ICON_BRIDGE_H_ |
| OLD | NEW |