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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/download/ChromeDownloadDelegate.java

Issue 1371553002: Remove mActivity from Tab and look at windowAndroid for tab (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/download/ChromeDownloadDelegate.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/ChromeDownloadDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/download/ChromeDownloadDelegate.java
index 52e05fa65d0671bd671359fdf02fe9d975f0daa3..e9c46d95ba99ae779be8c8e4c8ba6f0b0a99515d 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/download/ChromeDownloadDelegate.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/download/ChromeDownloadDelegate.java
@@ -51,8 +51,6 @@ public class ChromeDownloadDelegate
// The application context.
private final Context mContext;
private final Tab mTab;
- private final TabModelSelector mTabModelSelector;
-
// Pending download request for a dangerous file.
private DownloadInfo mPendingRequest;
@@ -122,14 +120,11 @@ public class ChromeDownloadDelegate
/**
* Creates ChromeDownloadDelegate.
* @param context The application context.
- * @param tabModelSelector The TabModelSelector responsible for {@code mTab}.
* @param tab The corresponding tab instance.
*/
- public ChromeDownloadDelegate(
- Context context, TabModelSelector tabModelSelector, Tab tab) {
+ public ChromeDownloadDelegate(Context context, Tab tab) {
mContext = context;
mTab = tab;
- mTabModelSelector = tabModelSelector;
mPendingRequest = null;
}
@@ -538,7 +533,7 @@ public class ChromeDownloadDelegate
|| contents.getNavigationController().isInitialNavigation();
if (isInitialNavigation) {
// Tab is created just for download, close it.
- return mTabModelSelector.closeTab(mTab);
+ return mTab.closeTab();
}
return false;
}

Powered by Google App Engine
This is Rietveld 408576698