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

Unified Diff: android_webview/native/aw_contents.cc

Issue 16212007: Implement the autofill UI for chromium powered android webview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue15097004
Patch Set: introduced java peer to AwAutofillManagerDelegate Created 7 years, 6 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: android_webview/native/aw_contents.cc
diff --git a/android_webview/native/aw_contents.cc b/android_webview/native/aw_contents.cc
index a7dfa54e23c98ced7b1d749bc35ba0f9f848108e..97e52c6ce7dbd0a12fb10ec75f0c247c40ce2bef 100644
--- a/android_webview/native/aw_contents.cc
+++ b/android_webview/native/aw_contents.cc
@@ -11,6 +11,7 @@
#include "android_webview/browser/net_disk_cache_remover.h"
#include "android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.h"
#include "android_webview/common/aw_hit_test_data.h"
+#include "android_webview/native/aw_autofill_manager_delegate.h"
#include "android_webview/native/aw_browser_dependency_factory.h"
#include "android_webview/native/aw_contents_client_bridge.h"
#include "android_webview/native/aw_contents_io_thread_client_impl.h"
@@ -193,6 +194,14 @@ void AwContents::InitAutofillIfNecessary(bool enabled) {
AutofillExternalDelegate::FromWebContents(web_contents));
}
+void AwContents::SetAwAutofillManagerDelegate(jobject delegate) {
+ JNIEnv* env = AttachCurrentThread();
+ ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
+ if (obj.is_null())
+ return;
+ Java_AwContents_setAwAutofillManagerDelegate(env, obj.obj(), delegate);
+}
+
void AwContents::SetWebContents(JNIEnv* env, jobject obj, jint new_wc) {
SetWebContents(reinterpret_cast<content::WebContents*>(new_wc));
}

Powered by Google App Engine
This is Rietveld 408576698