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

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

Issue 405623003: Add prefs for collapsed currently open tabs group in new tab page (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed javadoc for all calls Created 6 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/android/new_tab_page_prefs.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « no previous file | chrome/browser/android/new_tab_page_prefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698