Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2876)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/profiles/MostVisitedSites.java

Issue 2000653002: Replace the usage of SkBitmap with gfx::Image in the suggestion service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: accidental up load. This patchset was not committed with this CL Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/profiles/MostVisitedSites.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/profiles/MostVisitedSites.java b/chrome/android/java/src/org/chromium/chrome/browser/profiles/MostVisitedSites.java
index b39f17be8ed8da53073907814fedf9196a61d3f5..3a1f96b5d728f090c6c6e32ae402590b900bc267 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/profiles/MostVisitedSites.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/profiles/MostVisitedSites.java
@@ -4,8 +4,6 @@
package org.chromium.chrome.browser.profiles;
-import android.graphics.Bitmap;
-
import org.chromium.base.annotations.CalledByNative;
/**
@@ -45,22 +43,6 @@ public class MostVisitedSites {
}
/**
- * Interface for receiving a thumbnail for a most visited site.
- */
- public interface ThumbnailCallback {
- /**
- * Callback method for fetching thumbnail of a most visited URL.
- * Parameter may be null.
- *
- * @param thumbnail The bitmap thumbnail for the requested URL.
- * @param isLocalThumbnail Whether the thumbnail was locally captured, as opposed to
- * server-provided.
- */
- @CalledByNative("ThumbnailCallback")
- public void onMostVisitedURLsThumbnailAvailable(Bitmap thumbnail, boolean isLocalThumbnail);
- }
-
- /**
* MostVisitedSites constructor requires a valid user profile object.
*
* @param profile The profile for which to fetch most visited sites.
@@ -111,26 +93,6 @@ public class MostVisitedSites {
}
/**
- * Fetches thumbnail bitmap for a url returned by getMostVisitedURLs.
- *
- * @param url String representation of url.
- * @param callback Instance of a callback object.
- */
- public void getURLThumbnail(String url, final ThumbnailCallback callback) {
- ThumbnailCallback wrappedCallback = new ThumbnailCallback() {
- @Override
- public void onMostVisitedURLsThumbnailAvailable(Bitmap thumbnail,
- boolean isLocalThumbnail) {
- // Don't notify callback if we've already been destroyed.
- if (mNativeMostVisitedSitesBridge != 0) {
- callback.onMostVisitedURLsThumbnailAvailable(thumbnail, isLocalThumbnail);
- }
- }
- };
- nativeGetURLThumbnail(mNativeMostVisitedSitesBridge, url, wrappedCallback);
- }
-
- /**
* Blacklists a URL from the most visited URLs list.
*/
public void addBlacklistedUrl(String url) {
@@ -166,8 +128,8 @@ public class MostVisitedSites {
private native void nativeDestroy(long nativeMostVisitedSitesBridge);
private native void nativeSetMostVisitedURLsObserver(long nativeMostVisitedSitesBridge,
MostVisitedURLsObserver observer, int numSites);
- private native void nativeGetURLThumbnail(long nativeMostVisitedSitesBridge, String url,
- ThumbnailCallback callback);
+// private native void nativeGetURLThumbnail(long nativeMostVisitedSitesBridge, String url,
+// ThumbnailCallback callback);
private native void nativeAddOrRemoveBlacklistedUrl(
long nativeMostVisitedSitesBridge, String url,
boolean addUrl);

Powered by Google App Engine
This is Rietveld 408576698