Java Code Examples for org.chromium.chrome.browser.snackbar.SnackbarManager#SnackbarManageable

The following examples show how to use org.chromium.chrome.browser.snackbar.SnackbarManager#SnackbarManageable . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DownloadSnackbarController.java    From delion with Apache License 2.0 5 votes vote down vote up
public SnackbarManager getSnackbarManager() {
    Activity activity = ApplicationStatus.getLastTrackedFocusedActivity();
    if (activity != null && ApplicationStatus.hasVisibleActivities()
            && activity instanceof SnackbarManager.SnackbarManageable) {
        return ((SnackbarManager.SnackbarManageable) activity).getSnackbarManager();
    }
    return null;
}
 
Example 2
Source File: DownloadSnackbarController.java    From AndroidChromium with Apache License 2.0 5 votes vote down vote up
public SnackbarManager getSnackbarManager() {
    Activity activity = ApplicationStatus.getLastTrackedFocusedActivity();
    if (activity != null && ApplicationStatus.hasVisibleActivities()
            && activity instanceof SnackbarManager.SnackbarManageable) {
        return ((SnackbarManager.SnackbarManageable) activity).getSnackbarManager();
    }
    return null;
}
 
Example 3
Source File: BlimpMessageBuilder.java    From AndroidChromium with Apache License 2.0 5 votes vote down vote up
/**
 * Get {@link SnackbarManager} of current focused activity.
 * @return The SnackbarManager or null if the activity doesn't hold a SnackbarManager.
 */
@VisibleForTesting
protected SnackbarManager getSnackbarManager(Activity activity) {
    if (activity != null && activity instanceof SnackbarManager.SnackbarManageable) {
        return ((SnackbarManager.SnackbarManageable) activity).getSnackbarManager();
    }
    return null;
}
 
Example 4
Source File: DownloadSnackbarController.java    From 365browser with Apache License 2.0 5 votes vote down vote up
public SnackbarManager getSnackbarManager() {
    Activity activity = getActivity();
    if (activity != null && activity instanceof SnackbarManager.SnackbarManageable) {
        return ((SnackbarManager.SnackbarManageable) activity).getSnackbarManager();
    }
    return null;
}