This source file includes following definitions.
- destroy
- setSnapshotDocumentCollapsed
- getSnapshotDocumentCollapsed
- setRecentlyClosedTabsCollapsed
- getRecentlyClosedTabsCollapsed
- setSyncPromoCollapsed
- getSyncPromoCollapsed
- setForeignSessionCollapsed
- getForeignSessionCollapsed
- nativeInit
- nativeDestroy
- nativeSetSnapshotDocumentCollapsed
- nativeGetSnapshotDocumentCollapsed
- nativeSetRecentlyClosedTabsCollapsed
- nativeGetRecentlyClosedTabsCollapsed
- nativeSetSyncPromoCollapsed
- nativeGetSyncPromoCollapsed
- nativeSetForeignSessionCollapsed
- nativeGetForeignSessionCollapsed
package org.chromium.chrome.browser;
import org.chromium.chrome.browser.ForeignSessionHelper.ForeignSession;
import org.chromium.chrome.browser.profiles.Profile;
public class NewTabPagePrefs {
private long mNativeNewTabPagePrefs;
public NewTabPagePrefs(Profile profile) {
mNativeNewTabPagePrefs = nativeInit(profile);
}
public void destroy() {
assert mNativeNewTabPagePrefs != 0;
nativeDestroy(mNativeNewTabPagePrefs);
mNativeNewTabPagePrefs = 0;
}
public void setSnapshotDocumentCollapsed(boolean isCollapsed) {
nativeSetSnapshotDocumentCollapsed(mNativeNewTabPagePrefs, isCollapsed);
}
public boolean getSnapshotDocumentCollapsed() {
return nativeGetSnapshotDocumentCollapsed(mNativeNewTabPagePrefs);
}
public void setRecentlyClosedTabsCollapsed(boolean isCollapsed) {
nativeSetRecentlyClosedTabsCollapsed(mNativeNewTabPagePrefs, isCollapsed);
}
public boolean getRecentlyClosedTabsCollapsed() {
return nativeGetRecentlyClosedTabsCollapsed(mNativeNewTabPagePrefs);
}
public void setSyncPromoCollapsed(boolean isCollapsed) {
nativeSetSyncPromoCollapsed(mNativeNewTabPagePrefs, isCollapsed);
}
public boolean getSyncPromoCollapsed() {
return nativeGetSyncPromoCollapsed(mNativeNewTabPagePrefs);
}
public void setForeignSessionCollapsed(ForeignSession session, boolean isCollapsed) {
nativeSetForeignSessionCollapsed(mNativeNewTabPagePrefs, session.tag, isCollapsed);
}
public boolean getForeignSessionCollapsed(ForeignSession session) {
return nativeGetForeignSessionCollapsed(mNativeNewTabPagePrefs, session.tag);
}
private static native long nativeInit(Profile profile);
private static native void nativeDestroy(long nativeNewTabPagePrefs);
private static native void nativeSetSnapshotDocumentCollapsed(
long nativeNewTabPagePrefs, boolean isCollapsed);
private static native boolean nativeGetSnapshotDocumentCollapsed(
long nativeNewTabPagePrefs);
private static native void nativeSetRecentlyClosedTabsCollapsed(
long nativeNewTabPagePrefs, boolean isCollapsed);
private static native boolean nativeGetRecentlyClosedTabsCollapsed(
long nativeNewTabPagePrefs);
private static native void nativeSetSyncPromoCollapsed(long nativeNewTabPagePrefs,
boolean isCollapsed);
private static native boolean nativeGetSyncPromoCollapsed(long nativeNewTabPagePrefs);
private static native void nativeSetForeignSessionCollapsed(
long nativeNewTabPagePrefs, String sessionTag, boolean isCollapsed);
private static native boolean nativeGetForeignSessionCollapsed(
long nativeNewTabPagePrefs, String sessionTag);
}