Index: chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsBridge.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsBridge.java |
index 92e089fe14376b9865524324923985b51f00dc82..a712773c9dab21a03b3ab8867b9bdc9b55bc193f 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsBridge.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsBridge.java |
@@ -23,14 +23,6 @@ public class SnippetsBridge { |
private SnippetsObserver mObserver; |
/** |
- * A callback that is called after a snippet image was fetched from the snippets service. |
- */ |
- public interface FetchSnippetImageCallback { |
- @CalledByNative("FetchSnippetImageCallback") |
- void onSnippetImageAvailable(Bitmap image); |
- } |
- |
- /** |
* An observer for events in the snippets service. |
*/ |
public interface SnippetsObserver { |
@@ -89,7 +81,7 @@ public class SnippetsBridge { |
/** |
* Fetches the thumbnail image for a snippet. |
*/ |
- public void fetchSnippetImage(SnippetArticle snippet, FetchSnippetImageCallback callback) { |
+ public void fetchSnippetImage(SnippetArticle snippet, Callback<Bitmap> callback) { |
nativeFetchImage(mNativeSnippetsBridge, snippet.mId, callback); |
} |
@@ -102,14 +94,6 @@ public class SnippetsBridge { |
} |
/** |
- * {@link Callback#onResult} is not annotated with CalledByNative, so we must use this wrapper. |
- */ |
- @CalledByNative |
- private static void runCallback(Callback<Boolean> callback, boolean result) { |
- callback.onResult(result); |
- } |
- |
- /** |
* Sets the recipient for the fetched snippets. |
* |
* An observer needs to be set before the native code attempts to transmit snippets them to |
@@ -155,5 +139,5 @@ public class SnippetsBridge { |
private static native void nativeSnippetVisited(long nativeNTPSnippetsBridge, |
Callback<Boolean> callback, String url); |
private native void nativeFetchImage( |
- long nativeNTPSnippetsBridge, String snippetId, FetchSnippetImageCallback callback); |
+ long nativeNTPSnippetsBridge, String snippetId, Callback<Bitmap> callback); |
} |