Index: chrome/android/java/src/org/chromium/chrome/browser/NewTabPagePrefs.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/NewTabPagePrefs.java b/chrome/android/java/src/org/chromium/chrome/browser/NewTabPagePrefs.java |
index f2fdf3f759d0839540c45fd24c9117e591858bb9..21e80f8d0021bd90086f86cc4312942d01864d45 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/NewTabPagePrefs.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/NewTabPagePrefs.java |
@@ -31,67 +31,90 @@ public class NewTabPagePrefs { |
} |
/** |
- * Set snapshot document list collapsed or uncollapsed state in preferences. |
- * @param isCollapsed {@code True} Whether we want the snapshot documents list to be collapsed. |
+ * Sets whether the list of currently open tabs is collapsed (vs expanded) on the Recent Tabs |
+ * page. |
+ * @param isCollapsed Whether we want the currently open tabs list to be collapsed. |
+ */ |
+ public void setCurrentlyOpenTabsCollapsed(boolean isCollapsed) { |
+ nativeSetCurrentlyOpenTabsCollapsed(mNativeNewTabPagePrefs, isCollapsed); |
+ } |
+ |
+ /** |
+ * Gets whether the list of currently open tabs is collapsed (vs expanded) on Recent Tabs page. |
+ * @return Whether the list of currently open tabs is collapsed (vs expanded) on |
+ * the Recent Tabs page. |
+ */ |
+ public boolean getCurrentlyOpenTabsCollapsed() { |
+ return nativeGetCurrentlyOpenTabsCollapsed(mNativeNewTabPagePrefs); |
+ } |
+ |
+ /** |
+ * Sets whether the list of snapshot documents is collapsed (vs expanded) on the Recent Tabs |
+ * page. |
+ * @param isCollapsed Whether we want the snapshot documents list to be collapsed. |
*/ |
public void setSnapshotDocumentCollapsed(boolean isCollapsed) { |
nativeSetSnapshotDocumentCollapsed(mNativeNewTabPagePrefs, isCollapsed); |
} |
/** |
- * Get the snapshot document list collapsed or uncollapsed state in preferences. |
- * @return {@code True} Whether the snapshot documnets list is collapsed. |
+ * Gets whether the list of snapshot documents is collapsed (vs expanded) on |
+ * the Recent Tabs page. |
+ * @return Whether the list of snapshot documents is collapsed (vs expanded) on |
+ * the Recent Tabs page. |
*/ |
public boolean getSnapshotDocumentCollapsed() { |
return nativeGetSnapshotDocumentCollapsed(mNativeNewTabPagePrefs); |
} |
/** |
- * Set recently closed tabs list collapsed or uncollapsed state in preferences. |
- * @param isCollapsed {@code True} Whether we want the recently closed tabs list to be |
- * collapsed. |
+ * Sets whether the list of recently closed tabs is collapsed (vs expanded) on the Recent Tabs |
+ * page. |
+ * @param isCollapsed Whether we want the recently closed tabs list to be collapsed. |
*/ |
public void setRecentlyClosedTabsCollapsed(boolean isCollapsed) { |
nativeSetRecentlyClosedTabsCollapsed(mNativeNewTabPagePrefs, isCollapsed); |
} |
/** |
- * Get the recently closed document list collapsed or uncollapsed state in preferences. |
- * @return {@code True} Whether the recently closed list is collapsed. |
+ * Gets whether the list of recently closed tabs is collapsed (vs expanded) on |
+ * the Recent Tabs page. |
+ * @return Whether the list of recently closed tabs is collapsed (vs expanded) on |
+ * the Recent Tabs page. |
*/ |
public boolean getRecentlyClosedTabsCollapsed() { |
return nativeGetRecentlyClosedTabsCollapsed(mNativeNewTabPagePrefs); |
} |
/** |
- * Set sync promo collapsed or uncollapsed state in preferences. |
- * @param isCollapsed {@code True} Whether we want the sync promo to be collapsed. |
+ * Sets whether sync promo is collapsed (vs expanded) on the Recent Tabs page. |
+ * @param isCollapsed Whether we want the sync promo to be collapsed. |
*/ |
public void setSyncPromoCollapsed(boolean isCollapsed) { |
nativeSetSyncPromoCollapsed(mNativeNewTabPagePrefs, isCollapsed); |
} |
/** |
- * Get the sync promo collapsed or uncollapsed state in preferences. |
- * @return {@code True} Whether the snapshot documnets list is collapsed. |
+ * Gets whether sync promo is collapsed (vs expanded) on the Recent Tabs page. |
+ * @return Whether the sync promo is collapsed (vs expanded) on the Recent Tabs page. |
*/ |
public boolean getSyncPromoCollapsed() { |
return nativeGetSyncPromoCollapsed(mNativeNewTabPagePrefs); |
} |
/** |
- * Set the given session collapsed or uncollapsed in preferences. |
- * @param session Session to set collapsed or uncollapsed. |
- * @param isCollapsed {@code True} iff we want the session to be collapsed. |
+ * Sets whether the given foreign session is collapsed (vs expanded) on the Recent Tabs page. |
+ * @param session Session to set collapsed or expanded. |
+ * @param isCollapsed Whether we want the foreign session to be collapsed. |
*/ |
public void setForeignSessionCollapsed(ForeignSession session, boolean isCollapsed) { |
nativeSetForeignSessionCollapsed(mNativeNewTabPagePrefs, session.tag, isCollapsed); |
} |
/** |
- * Get the given session collapsed or uncollapsed state in preferences. |
+ * Gets whether the given foreign session is collapsed (vs expanded) on the Recent Tabs page. |
* @param session Session to fetch collapsed state. |
- * @return {@code True} if the session is collapsed, false if expanded. |
+ * @return Whether the given foreign session is collapsed (vs expanded) on the Recent Tabs page. |
*/ |
public boolean getForeignSessionCollapsed(ForeignSession session) { |
return nativeGetForeignSessionCollapsed(mNativeNewTabPagePrefs, session.tag); |
@@ -99,6 +122,10 @@ public class NewTabPagePrefs { |
private static native long nativeInit(Profile profile); |
private static native void nativeDestroy(long nativeNewTabPagePrefs); |
+ private static native void nativeSetCurrentlyOpenTabsCollapsed( |
+ long nativeNewTabPagePrefs, boolean isCollapsed); |
+ private static native boolean nativeGetCurrentlyOpenTabsCollapsed( |
+ long nativeNewTabPagePrefs); |
private static native void nativeSetSnapshotDocumentCollapsed( |
long nativeNewTabPagePrefs, boolean isCollapsed); |
private static native boolean nativeGetSnapshotDocumentCollapsed( |