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

Unified Diff: android_webview/native/aw_contents.cc

Issue 10702083: Add ContentViewDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typo Created 8 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
« no previous file with comments | « android_webview/native/aw_contents.h ('k') | android_webview/native/aw_contents_io_thread_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/native/aw_contents.cc
diff --git a/android_webview/native/aw_contents.cc b/android_webview/native/aw_contents.cc
index 9984b1981bca19777a04ad8847e3f62428d071b8..be5193ce404c849adb519d353d9f0b57951cb075 100644
--- a/android_webview/native/aw_contents.cc
+++ b/android_webview/native/aw_contents.cc
@@ -8,12 +8,14 @@
#include "android_webview/native/aw_browser_dependency_factory.h"
#include "android_webview/native/aw_contents_container.h"
#include "android_webview/native/aw_web_contents_delegate.h"
+#include "android_webview/native/aw_contents_io_thread_client.h"
#include "base/android/jni_android.h"
#include "base/android/jni_string.h"
#include "base/bind.h"
#include "base/callback.h"
#include "base/supports_user_data.h"
#include "content/public/browser/android/content_view_core.h"
+#include "content/public/browser/browser_thread.h"
#include "content/public/browser/web_contents.h"
#include "jni/AwContents_jni.h"
@@ -22,6 +24,7 @@ using base::android::ConvertUTF8ToJavaString;
using base::android::ConvertUTF16ToJavaString;
using base::android::ScopedJavaGlobalRef;
using base::android::ScopedJavaLocalRef;
+using content::BrowserThread;
using content::ContentViewCore;
using content::WebContents;
@@ -117,6 +120,13 @@ void AwContents::onReceivedHttpAuthRequest(
jrealm.obj());
}
+void AwContents::SetIoThreadClient(JNIEnv* env, jobject obj, jobject client) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ content::WebContents* web_contents = contents_container_->GetWebContents();
+ AwContentsIoThreadClient::Associate(
+ web_contents, ScopedJavaLocalRef<jobject>(env, client));
+}
+
static jint Init(JNIEnv* env,
jobject obj,
jobject web_contents_delegate,
« no previous file with comments | « android_webview/native/aw_contents.h ('k') | android_webview/native/aw_contents_io_thread_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698