diff options
author | Selim Gurun <sgurun@google.com> | 2012-08-29 13:08:13 -0700 |
---|---|---|
committer | Selim Gurun <sgurun@google.com> | 2012-08-29 13:08:13 -0700 |
commit | 0b3d66fc2275fb5270cb7166cc991be7dc9d8ff7 (patch) | |
tree | 5ddaa951b49481b6162174d50da036baeda15930 /src/com/android/browser/Tab.java | |
parent | adb2b6554ff7670390a0acd5507dffe430a4cd0d (diff) | |
download | packages_apps_Browser-0b3d66fc2275fb5270cb7166cc991be7dc9d8ff7.zip packages_apps_Browser-0b3d66fc2275fb5270cb7166cc991be7dc9d8ff7.tar.gz packages_apps_Browser-0b3d66fc2275fb5270cb7166cc991be7dc9d8ff7.tar.bz2 |
Pass referer on download requests
Bug: 6662557
Change-Id: Ib7fdc4b3f1e0f7370631d8a222565faaee550bfb
Diffstat (limited to 'src/com/android/browser/Tab.java')
-rw-r--r-- | src/com/android/browser/Tab.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/com/android/browser/Tab.java b/src/com/android/browser/Tab.java index 484357e..b5000c2 100644 --- a/src/com/android/browser/Tab.java +++ b/src/com/android/browser/Tab.java @@ -46,9 +46,9 @@ import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.View; import android.view.ViewStub; +import android.webkit.BrowserDownloadListener; import android.webkit.ClientCertRequestHandler; import android.webkit.ConsoleMessage; -import android.webkit.DownloadListener; import android.webkit.GeolocationPermissions; import android.webkit.HttpAuthHandler; import android.webkit.SslErrorHandler; @@ -172,7 +172,7 @@ class Tab implements PictureListener { private ErrorConsoleView mErrorConsole; // The listener that gets invoked when a download is started from the // mMainView - private final DownloadListener mDownloadListener; + private final BrowserDownloadListener mDownloadListener; // Listener used to know when we move forward or back in the history list. private final WebBackForwardListClient mWebBackForwardListClient; private DataController mDataController; @@ -1160,12 +1160,12 @@ class Tab implements PictureListener { mInPageLoad = false; mInForeground = false; - mDownloadListener = new DownloadListener() { + mDownloadListener = new BrowserDownloadListener() { public void onDownloadStart(String url, String userAgent, - String contentDisposition, String mimetype, + String contentDisposition, String mimetype, String referer, long contentLength) { mWebViewController.onDownloadStart(Tab.this, url, userAgent, contentDisposition, - mimetype, contentLength); + mimetype, referer, contentLength); } }; mWebBackForwardListClient = new WebBackForwardListClient() { @@ -1354,12 +1354,12 @@ class Tab implements PictureListener { mWebChromeClient)); // Set a different DownloadListener for the mSubView, since it will // just need to dismiss the mSubView, rather than close the Tab - mSubView.setDownloadListener(new DownloadListener() { + mSubView.setDownloadListener(new BrowserDownloadListener() { public void onDownloadStart(String url, String userAgent, - String contentDisposition, String mimetype, + String contentDisposition, String mimetype, String referer, long contentLength) { mWebViewController.onDownloadStart(Tab.this, url, userAgent, - contentDisposition, mimetype, contentLength); + contentDisposition, mimetype, referer, contentLength); if (mSubView.copyBackForwardList().getSize() == 0) { // This subwindow was opened for the sole purpose of // downloading a file. Remove it. |