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 ccd53453905aecad1ce9b28d0a928b45127a44ad..8c45fb1b80015587fe77666fe54d063b51578bd9 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 |
@@ -51,9 +51,11 @@ public class MostVisitedSites { |
* 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. |
Ted C
2015/09/28 23:08:45
indenting is off
|
*/ |
@CalledByNative("ThumbnailCallback") |
- public void onMostVisitedURLsThumbnailAvailable(Bitmap thumbnail); |
+ public void onMostVisitedURLsThumbnailAvailable(Bitmap thumbnail, boolean isLocalThumbnail); |
} |
/** |
@@ -111,10 +113,11 @@ public class MostVisitedSites { |
public void getURLThumbnail(String url, final ThumbnailCallback callback) { |
ThumbnailCallback wrappedCallback = new ThumbnailCallback() { |
@Override |
- public void onMostVisitedURLsThumbnailAvailable(Bitmap thumbnail) { |
+ public void onMostVisitedURLsThumbnailAvailable(Bitmap thumbnail, |
+ boolean isLocalThumbnail) { |
// Don't notify callback if we've already been destroyed. |
if (mNativeMostVisitedSites != 0) { |
- callback.onMostVisitedURLsThumbnailAvailable(thumbnail); |
+ callback.onMostVisitedURLsThumbnailAvailable(thumbnail, isLocalThumbnail); |
} |
} |
}; |
@@ -122,7 +125,7 @@ public class MostVisitedSites { |
} |
/** |
- * Blacklist a URL from the most visited URLs list. |
+ * Blacklists a URL from the most visited URLs list. |
* @param url The URL to be blacklisted. |
*/ |
public void blacklistUrl(String url) { |
@@ -130,28 +133,35 @@ public class MostVisitedSites { |
} |
/** |
- * Called when the loading of the Most Visited page is complete. |
+ * Records metrics about which types of tiles are displayed. |
+ * @param tileTypes An array of values from MostVisitedTileType indicating the type of each |
+ * tile that's currently showing. |
Ted C
2015/09/28 23:08:45
same indenting thing...should either be 8 for alig
|
+ * @paral isIconMode Whether the icon-based version of the NTP is showing (as opposed to the |
+ * thumbnail-based version). |
*/ |
- public void onLoadingComplete() { |
- nativeOnLoadingComplete(mNativeMostVisitedSites); |
+ public void recordTileTypeMetrics(int[] tileTypes, boolean isIconMode) { |
newt (away)
2015/09/28 22:34:21
This was only every used for metrics recording, so
|
+ nativeRecordTileTypeMetrics(mNativeMostVisitedSites, tileTypes, isIconMode); |
} |
/** |
- * Record the opening of a Most Visited Item. |
+ * Records the opening of a Most Visited Item. |
* @param index The index of the item that was opened. |
+ * @param tileType The visual type of the item. Valid values are listed in MostVisitedTileType. |
*/ |
- public void recordOpenedMostVisitedItem(int index) { |
- nativeRecordOpenedMostVisitedItem(mNativeMostVisitedSites, index); |
+ public void recordOpenedMostVisitedItem(int index, int tileType) { |
+ nativeRecordOpenedMostVisitedItem(mNativeMostVisitedSites, index, tileType); |
} |
private native long nativeInit(Profile profile); |
private native void nativeDestroy(long nativeMostVisitedSites); |
- private native void nativeOnLoadingComplete(long nativeMostVisitedSites); |
private native void nativeSetMostVisitedURLsObserver(long nativeMostVisitedSites, |
MostVisitedURLsObserver observer, int numSites); |
private native void nativeGetURLThumbnail(long nativeMostVisitedSites, String url, |
ThumbnailCallback callback); |
private native void nativeBlacklistUrl(long nativeMostVisitedSites, String url); |
- private native void nativeRecordOpenedMostVisitedItem(long nativeMostVisitedSites, int index); |
+ private native void nativeRecordTileTypeMetrics(long nativeMostVisitedSites, int[] tileTypes, |
+ boolean isIconMode); |
+ private native void nativeRecordOpenedMostVisitedItem(long nativeMostVisitedSites, int index, |
+ int tileType); |
} |