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

Unified Diff: chrome/browser/android/tab_android.cc

Issue 2014803002: Move DownloadControllerAndroid from content/ to chrome/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: moved download delegate interface to native Created 4 years, 7 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/browser/android/tab_android.cc
diff --git a/chrome/browser/android/tab_android.cc b/chrome/browser/android/tab_android.cc
index 533528fc4cc7baac2aacc91704b2207edcc643a2..48de52dcd54e5eb8afa4008a895a27b6db3fdf34 100644
--- a/chrome/browser/android/tab_android.cc
+++ b/chrome/browser/android/tab_android.cc
@@ -14,6 +14,7 @@
#include "base/trace_event/trace_event.h"
#include "cc/layers/layer.h"
#include "chrome/browser/android/compositor/tab_content_manager.h"
+#include "chrome/browser/android/download/chrome_download_delegate.h"
#include "chrome/browser/android/metrics/uma_utils.h"
#include "chrome/browser/android/offline_pages/offline_page_model_factory.h"
#include "chrome/browser/android/offline_pages/offline_page_utils.h"
@@ -379,6 +380,7 @@ void TabAndroid::InitWebContents(
jboolean incognito,
const JavaParamRef<jobject>& jcontent_view_core,
const JavaParamRef<jobject>& jweb_contents_delegate,
+ const JavaParamRef<jobject>& jdownload_delegate,
const JavaParamRef<jobject>& jcontext_menu_populator) {
content::ContentViewCore* content_view_core =
content::ContentViewCore::GetNativeContentViewCore(env,
@@ -404,6 +406,8 @@ void TabAndroid::InitWebContents(
env, jweb_contents_delegate));
web_contents_delegate_->LoadProgressChanged(web_contents(), 0);
web_contents()->SetDelegate(web_contents_delegate_.get());
+ web_contents()->SetDownloadDelegate(
+ new ChromeDownloadDelegate(jdownload_delegate));
no sievers 2016/06/02 23:29:06 Who takes ownership of the new ChromeDownloadDeleg
Jinsuk Kim 2016/06/03 11:04:14 Now ContentViewCoreImpl owns it and has the same l
notification_registrar_.Add(
this,

Powered by Google App Engine
This is Rietveld 408576698