Java源码示例:org.chromium.chrome.browser.sessions.SessionTabHelper
示例1
/**
* Returns true if data use tracking has started within a Tab. When data use tracking has
* started, returns true only once to signify the started event.
*
* @param tab The tab that may have started tracking data use.
* @return true If data use tracking has indeed started.
*/
public static boolean checkAndResetDataUseTrackingStarted(Tab tab) {
return nativeCheckAndResetDataUseTrackingStarted(
SessionTabHelper.sessionIdForTab(tab.getWebContents()), tab.getProfile());
}
示例2
/**
* Notifies that the user clicked "Continue" when the dialog box warning about exiting data use
* was shown.
*
* @param tab The tab on which the dialog box was shown.
*/
public static void userClickedContinueOnDialogBox(Tab tab) {
nativeUserClickedContinueOnDialogBox(
SessionTabHelper.sessionIdForTab(tab.getWebContents()), tab.getProfile());
}
示例3
/**
* Returns true if data use tracking is currently active on {@link tab} but will stop if the
* navigation continues. Should only be called before the navigation starts.
*
* @param tab The tab that is being queried for data use tracking.
* @param pageTransitionType transition type of the navigation
* @param packageName package name of the app package that started this navigation.
* @return true If {@link tab} is currently tracked but would stop if the navigation were to
* continue.
*/
public static boolean wouldDataUseTrackingEnd(Tab tab, String url, int pageTransitionType) {
return nativeWouldDataUseTrackingEnd(tab.getWebContents(),
SessionTabHelper.sessionIdForTab(tab.getWebContents()), url, pageTransitionType,
tab.getProfile());
}
示例4
/**
* Returns true if data use tracking has ended within a Tab. When data use tracking has
* ended, returns true only once to signify the ended event.
*
* @param tab The tab that may have ended tracking data use.
* @return true If data use tracking has indeed ended.
*/
public static boolean checkAndResetDataUseTrackingEnded(Tab tab) {
return nativeCheckAndResetDataUseTrackingEnded(
SessionTabHelper.sessionIdForTab(tab.getWebContents()), tab.getProfile());
}
示例5
/**
* Tells native code that a custom tab is navigating to a url from the given client app package.
*
* @param tab The custom tab that is navigating.
* @param packageName The client app package for the custom tab loading a url.
* @param url URL that is being loaded in the custom tab.
*/
public static void onCustomTabInitialNavigation(Tab tab, String packageName, String url) {
nativeOnCustomTabInitialNavigation(SessionTabHelper.sessionIdForTab(tab.getWebContents()),
packageName, url, tab.getProfile());
}
示例6
/**
* Returns true if data use tracking has started within a Tab. When data use tracking has
* started, returns true only once to signify the started event.
*
* @param tab The tab that may have started tracking data use.
* @return true If data use tracking has indeed started.
*/
public static boolean checkAndResetDataUseTrackingStarted(Tab tab) {
return nativeCheckAndResetDataUseTrackingStarted(
SessionTabHelper.sessionIdForTab(tab.getWebContents()), tab.getProfile());
}
示例7
/**
* Notifies that the user clicked "Continue" when the dialog box warning about exiting data use
* was shown.
*
* @param tab The tab on which the dialog box was shown.
*/
public static void userClickedContinueOnDialogBox(Tab tab) {
nativeUserClickedContinueOnDialogBox(
SessionTabHelper.sessionIdForTab(tab.getWebContents()), tab.getProfile());
}
示例8
/**
* Returns true if data use tracking is currently active on {@link tab} but will stop if the
* navigation continues. Should only be called before the navigation starts.
*
* @param tab The tab that is being queried for data use tracking.
* @param pageTransitionType transition type of the navigation
* @param packageName package name of the app package that started this navigation.
* @return true If {@link tab} is currently tracked but would stop if the navigation were to
* continue.
*/
public static boolean wouldDataUseTrackingEnd(Tab tab, String url, int pageTransitionType) {
return nativeWouldDataUseTrackingEnd(tab.getWebContents(),
SessionTabHelper.sessionIdForTab(tab.getWebContents()), url, pageTransitionType,
tab.getProfile());
}
示例9
/**
* Returns true if data use tracking has ended within a Tab. When data use tracking has
* ended, returns true only once to signify the ended event.
*
* @param tab The tab that may have ended tracking data use.
* @return true If data use tracking has indeed ended.
*/
public static boolean checkAndResetDataUseTrackingEnded(Tab tab) {
return nativeCheckAndResetDataUseTrackingEnded(
SessionTabHelper.sessionIdForTab(tab.getWebContents()), tab.getProfile());
}
示例10
/**
* Tells native code that a custom tab is navigating to a url from the given client app package.
*
* @param tab The custom tab that is navigating.
* @param packageName The client app package for the custom tab loading a url.
* @param url URL that is being loaded in the custom tab.
*/
public static void onCustomTabInitialNavigation(Tab tab, String packageName, String url) {
nativeOnCustomTabInitialNavigation(SessionTabHelper.sessionIdForTab(tab.getWebContents()),
packageName, url, tab.getProfile());
}
示例11
/**
* Returns true if data use tracking has started within a Tab. When data use tracking has
* started, returns true only once to signify the started event.
*
* @param tab The tab that may have started tracking data use.
* @return true If data use tracking has indeed started.
*/
public static boolean checkAndResetDataUseTrackingStarted(Tab tab) {
return nativeCheckAndResetDataUseTrackingStarted(
SessionTabHelper.sessionIdForTab(tab.getWebContents()), tab.getProfile());
}
示例12
/**
* Notifies that the user clicked "Continue" when the dialog box warning about exiting data use
* was shown.
*
* @param tab The tab on which the dialog box was shown.
*/
public static void userClickedContinueOnDialogBox(Tab tab) {
nativeUserClickedContinueOnDialogBox(
SessionTabHelper.sessionIdForTab(tab.getWebContents()), tab.getProfile());
}
示例13
/**
* Returns true if data use tracking is currently active on {@link tab} but will stop if the
* navigation continues. Should only be called before the navigation starts.
*
* @param tab The tab that is being queried for data use tracking.
* @param pageTransitionType transition type of the navigation
* @param packageName package name of the app package that started this navigation.
* @return true If {@link tab} is currently tracked but would stop if the navigation were to
* continue.
*/
public static boolean wouldDataUseTrackingEnd(Tab tab, String url, int pageTransitionType) {
return nativeWouldDataUseTrackingEnd(tab.getWebContents(),
SessionTabHelper.sessionIdForTab(tab.getWebContents()), url, pageTransitionType,
tab.getProfile());
}
示例14
/**
* Returns true if data use tracking has ended within a Tab. When data use tracking has
* ended, returns true only once to signify the ended event.
*
* @param tab The tab that may have ended tracking data use.
* @return true If data use tracking has indeed ended.
*/
public static boolean checkAndResetDataUseTrackingEnded(Tab tab) {
return nativeCheckAndResetDataUseTrackingEnded(
SessionTabHelper.sessionIdForTab(tab.getWebContents()), tab.getProfile());
}
示例15
/**
* Tells native code that a custom tab is navigating to a url from the given client app package.
*
* @param tab The custom tab that is navigating.
* @param packageName The client app package for the custom tab loading a url.
* @param url URL that is being loaded in the custom tab.
*/
public static void onCustomTabInitialNavigation(Tab tab, String packageName, String url) {
nativeOnCustomTabInitialNavigation(SessionTabHelper.sessionIdForTab(tab.getWebContents()),
packageName, url, tab.getProfile());
}