org.chromium.chrome.browser.download.ui.DownloadManagerUi Java Examples

The following examples show how to use org.chromium.chrome.browser.download.ui.DownloadManagerUi. 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: DownloadActivity.java    From delion with Apache License 2.0 5 votes vote down vote up
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    mDownloadManagerUi =
            (DownloadManagerUi) LayoutInflater.from(this).inflate(R.layout.download_main, null);
    mDownloadManagerUi.initialize(this, this);
    setContentView(mDownloadManagerUi);
}
 
Example #2
Source File: DownloadActivity.java    From AndroidChromium with Apache License 2.0 5 votes vote down vote up
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    boolean isOffTheRecord = DownloadUtils.shouldShowOffTheRecordDownloads(getIntent());
    ComponentName parentComponent = IntentUtils.safeGetParcelableExtra(
            getIntent(), IntentHandler.EXTRA_PARENT_COMPONENT);
    mDownloadManagerUi = new DownloadManagerUi(this, isOffTheRecord, parentComponent);
    setContentView(mDownloadManagerUi.getView());
    mIsOffTheRecord = isOffTheRecord;
    mDownloadManagerUi.addObserver(mUiObserver);
    // Call updateForUrl() to align with how DownloadPage interacts with DownloadManagerUi.
    mDownloadManagerUi.updateForUrl(UrlConstants.DOWNLOADS_URL);
}
 
Example #3
Source File: DownloadActivity.java    From 365browser with Apache License 2.0 5 votes vote down vote up
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    boolean isOffTheRecord = DownloadUtils.shouldShowOffTheRecordDownloads(getIntent());
    ComponentName parentComponent = IntentUtils.safeGetParcelableExtra(
            getIntent(), IntentHandler.EXTRA_PARENT_COMPONENT);
    mDownloadManagerUi = new DownloadManagerUi(
            this, isOffTheRecord, parentComponent, true, getSnackbarManager());
    setContentView(mDownloadManagerUi.getView());
    mIsOffTheRecord = isOffTheRecord;
    mDownloadManagerUi.addObserver(mUiObserver);
    // Call updateForUrl() to align with how DownloadPage interacts with DownloadManagerUi.
    mDownloadManagerUi.updateForUrl(UrlConstants.DOWNLOADS_URL);
}
 
Example #4
Source File: DownloadActivity.java    From delion with Apache License 2.0 4 votes vote down vote up
@Override
public void onCloseButtonClicked(DownloadManagerUi ui) {
    finish();
}
 
Example #5
Source File: DownloadActivity.java    From AndroidChromium with Apache License 2.0 4 votes vote down vote up
@VisibleForTesting
DownloadManagerUi getDownloadManagerUiForTests() {
    return mDownloadManagerUi;
}
 
Example #6
Source File: DownloadActivity.java    From 365browser with Apache License 2.0 4 votes vote down vote up
@VisibleForTesting
DownloadManagerUi getDownloadManagerUiForTests() {
    return mDownloadManagerUi;
}