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

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: convert NOTREACHED to NOTIMPLEMENTED 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
« no previous file with comments | « android_webview/native/aw_contents.h ('k') | android_webview/native/webview_native.gyp » ('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 93f9f915503582d4bc60479d5c6b0d5ef83adfe6..f87a8dd6d65fd2e3d93ad7a93054d7a94781381d 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"
@@ -192,7 +193,7 @@ void AwContents::InitAutofillIfNecessary(bool enabled) {
// Do not initialize if the feature is not enabled.
if (!enabled)
return;
- // Check if the autofill manager already exists.
+ // Check if the autofill driver already exists.
content::WebContents* web_contents = web_contents_.get();
if (AutofillDriverImpl::FromWebContents(web_contents))
return;
@@ -207,6 +208,14 @@ void AwContents::InitAutofillIfNecessary(bool enabled) {
AutofillManager::DISABLE_AUTOFILL_DOWNLOAD_MANAGER);
}
+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);
+}
+
AwContents::~AwContents() {
DCHECK(AwContents::FromWebContents(web_contents_.get()) == this);
web_contents_->RemoveUserData(kAwContentsUserDataKey);
« no previous file with comments | « android_webview/native/aw_contents.h ('k') | android_webview/native/webview_native.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698