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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/download/DownloadActivity.java

Issue 2751583002: 🏡 Show correct BottomSheetContent toolbar when contents swapped (Closed)
Patch Set: Remove duplicate "and" Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.download; 5 package org.chromium.chrome.browser.download;
6 6
7 import android.content.ComponentName; 7 import android.content.ComponentName;
8 import android.os.Bundle; 8 import android.os.Bundle;
9 9
10 import org.chromium.base.VisibleForTesting; 10 import org.chromium.base.VisibleForTesting;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 } 42 }
43 }; 43 };
44 44
45 @Override 45 @Override
46 public void onCreate(Bundle savedInstanceState) { 46 public void onCreate(Bundle savedInstanceState) {
47 super.onCreate(savedInstanceState); 47 super.onCreate(savedInstanceState);
48 48
49 boolean isOffTheRecord = DownloadUtils.shouldShowOffTheRecordDownloads(g etIntent()); 49 boolean isOffTheRecord = DownloadUtils.shouldShowOffTheRecordDownloads(g etIntent());
50 ComponentName parentComponent = IntentUtils.safeGetParcelableExtra( 50 ComponentName parentComponent = IntentUtils.safeGetParcelableExtra(
51 getIntent(), IntentHandler.EXTRA_PARENT_COMPONENT); 51 getIntent(), IntentHandler.EXTRA_PARENT_COMPONENT);
52 mDownloadManagerUi = new DownloadManagerUi(this, isOffTheRecord, parentC omponent); 52 mDownloadManagerUi = new DownloadManagerUi(this, isOffTheRecord, parentC omponent, true);
53 setContentView(mDownloadManagerUi.getView()); 53 setContentView(mDownloadManagerUi.getView());
54 mIsOffTheRecord = isOffTheRecord; 54 mIsOffTheRecord = isOffTheRecord;
55 mDownloadManagerUi.addObserver(mUiObserver); 55 mDownloadManagerUi.addObserver(mUiObserver);
56 // Call updateForUrl() to align with how DownloadPage interacts with Dow nloadManagerUi. 56 // Call updateForUrl() to align with how DownloadPage interacts with Dow nloadManagerUi.
57 mDownloadManagerUi.updateForUrl(UrlConstants.DOWNLOADS_URL); 57 mDownloadManagerUi.updateForUrl(UrlConstants.DOWNLOADS_URL);
58 } 58 }
59 59
60 @Override 60 @Override
61 public void onResume() { 61 public void onResume() {
62 super.onResume(); 62 super.onResume();
(...skipping 20 matching lines...) Expand all
83 protected void onDestroy() { 83 protected void onDestroy() {
84 mDownloadManagerUi.onDestroyed(); 84 mDownloadManagerUi.onDestroyed();
85 super.onDestroy(); 85 super.onDestroy();
86 } 86 }
87 87
88 @VisibleForTesting 88 @VisibleForTesting
89 DownloadManagerUi getDownloadManagerUiForTests() { 89 DownloadManagerUi getDownloadManagerUiForTests() {
90 return mDownloadManagerUi; 90 return mDownloadManagerUi;
91 } 91 }
92 } 92 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698