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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java

Issue 11139003: Move DownloadListener handling out to webview layer (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: comment nit Created 8 years, 2 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: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
index 4073fc4e19a55503d22a8cc5019d6188e30b877c..c81626eade73330fc59d937331fc81ac03bedaa6 100644
--- a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
+++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
@@ -33,7 +33,6 @@ import android.view.accessibility.AccessibilityNodeInfo;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputConnection;
import android.view.inputmethod.InputMethodManager;
-import android.webkit.DownloadListener;
import org.chromium.base.CalledByNative;
import org.chromium.base.JNINamespace;
@@ -213,11 +212,7 @@ public class ContentViewCore implements MotionEventDelegate {
// private ActionMode mActionMode;
private boolean mActionBarVisible; // Remove this when mActionMode is upstreamed.
- // The legacy webview DownloadListener.
- private DownloadListener mDownloadListener;
- // ContentViewDownloadDelegate adds support for authenticated downloads
- // and POST downloads. Embedders should prefer ContentViewDownloadDelegate
- // over DownloadListener.
+ // Delegate that will handle GET downloads, and be notified of completion of POST downloads.
private ContentViewDownloadDelegate mDownloadDelegate;
// Whether a physical keyboard is connected.
@@ -1400,30 +1395,10 @@ public class ContentViewCore implements MotionEventDelegate {
}
/**
- * Register the listener to be used when content can not be handled by the
- * rendering engine, and should be downloaded instead. This will replace the
- * current listener.
- * @param listener An implementation of DownloadListener.
- */
- // TODO(nileshagrawal): decide if setDownloadDelegate will be public API. If so,
- // this method should be deprecated and the javadoc should make reference to the
- // fact that a ContentViewDownloadDelegate will be used in preference to a
- // DownloadListener.
- public void setDownloadListener(DownloadListener listener) {
- mDownloadListener = listener;
- }
-
- // Called by DownloadController.
- DownloadListener downloadListener() {
- return mDownloadListener;
- }
-
- /**
* Register the delegate to be used when content can not be handled by
* the rendering engine, and should be downloaded instead. This will replace
- * the current delegate or existing DownloadListner.
- * Embedders should prefer this over the legacy DownloadListener.
- * @param listener An implementation of ContentViewDownloadDelegate.
+ * the current delegate, if any.
+ * @param delegate An implementation of ContentViewDownloadDelegate.
*/
public void setDownloadDelegate(ContentViewDownloadDelegate delegate) {
mDownloadDelegate = delegate;

Powered by Google App Engine
This is Rietveld 408576698