1f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)// Copyright 2014 The Chromium Authors. All rights reserved.
2eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch// Use of this source code is governed by a BSD-style license that can be
3eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch// found in the LICENSE file.
4eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch
5f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)#include "android_webview/native/aw_autofill_client.h"
6eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch
7eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch#include "android_webview/browser/aw_browser_context.h"
8eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch#include "android_webview/browser/aw_content_browser_client.h"
9a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)#include "android_webview/browser/aw_form_database_service.h"
10eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch#include "android_webview/browser/aw_pref_store.h"
11eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch#include "android_webview/native/aw_contents.h"
12eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch#include "base/android/jni_android.h"
13eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch#include "base/android/jni_string.h"
14eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch#include "base/android/scoped_java_ref.h"
15eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch#include "base/logging.h"
16eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch#include "base/prefs/pref_registry_simple.h"
17eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch#include "base/prefs/pref_service.h"
18f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#include "base/prefs/pref_service_factory.h"
19eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch#include "components/autofill/core/browser/autofill_popup_delegate.h"
20f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#include "components/autofill/core/browser/webdata/autofill_webdata_service.h"
21eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch#include "components/autofill/core/common/autofill_pref_names.h"
22eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch#include "components/user_prefs/user_prefs.h"
23eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch#include "content/public/browser/web_contents.h"
24f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)#include "jni/AwAutofillClient_jni.h"
25eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch
26eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdochusing base::android::AttachCurrentThread;
27eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdochusing base::android::ConvertUTF16ToJavaString;
28eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdochusing base::android::ScopedJavaLocalRef;
29eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdochusing content::WebContents;
30eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch
31f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)DEFINE_WEB_CONTENTS_USER_DATA_KEY(android_webview::AwAutofillClient);
32eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch
33eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdochnamespace android_webview {
34eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch
35eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch// Ownership: The native object is created (if autofill enabled) and owned by
36eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch// AwContents. The native object creates the java peer which handles most
37eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch// autofill functionality at the java side. The java peer is owned by Java
38eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch// AwContents. The native object only maintains a weak ref to it.
39f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)AwAutofillClient::AwAutofillClient(WebContents* contents)
40f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)    : web_contents_(contents), save_form_data_(false) {
41eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch  JNIEnv* env = AttachCurrentThread();
42eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch  ScopedJavaLocalRef<jobject> delegate;
43eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch  delegate.Reset(
44f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)      Java_AwAutofillClient_create(env, reinterpret_cast<intptr_t>(this)));
45eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch
46eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch  AwContents* aw_contents = AwContents::FromWebContents(web_contents_);
47f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)  aw_contents->SetAwAutofillClient(delegate.obj());
48eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch  java_ref_ = JavaObjectWeakGlobalRef(env, delegate.obj());
49eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch}
50eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch
51f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)AwAutofillClient::~AwAutofillClient() {
52eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch  HideAutofillPopup();
53eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch}
54eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch
55f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)void AwAutofillClient::SetSaveFormData(bool enabled) {
56eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch  save_form_data_ = enabled;
57eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch}
58eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch
59f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)bool AwAutofillClient::GetSaveFormData() {
60eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch  return save_form_data_;
61eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch}
62eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch
63f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)PrefService* AwAutofillClient::GetPrefs() {
64eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch  return user_prefs::UserPrefs::Get(
65eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch      AwContentBrowserClient::GetAwBrowserContext());
66eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch}
67eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch
68f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)autofill::PersonalDataManager* AwAutofillClient::GetPersonalDataManager() {
69eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch  return NULL;
70eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch}
71eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch
72f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)scoped_refptr<autofill::AutofillWebDataService>
73f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)AwAutofillClient::GetDatabase() {
74a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)  android_webview::AwFormDatabaseService* service =
75a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)      static_cast<android_webview::AwBrowserContext*>(
76a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)          web_contents_->GetBrowserContext())->GetFormDatabaseService();
77a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7Torne (Richard Coles)  return service->get_autofill_webdata_service();
78f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)}
79f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
80f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)void AwAutofillClient::ShowAutofillPopup(
81eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch    const gfx::RectF& element_bounds,
82eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch    base::i18n::TextDirection text_direction,
835d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    const std::vector<base::string16>& values,
845d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    const std::vector<base::string16>& labels,
855d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    const std::vector<base::string16>& icons,
86eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch    const std::vector<int>& identifiers,
87eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch    base::WeakPtr<autofill::AutofillPopupDelegate> delegate) {
88eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch  values_ = values;
89eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch  identifiers_ = identifiers;
90eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch  delegate_ = delegate;
91eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch
92eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch  // Convert element_bounds to be in screen space.
93010d83a9304c5a91596085d917d248abff47903aTorne (Richard Coles)  gfx::Rect client_area = web_contents_->GetContainerBounds();
94eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch  gfx::RectF element_bounds_in_screen_space =
95eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch      element_bounds + client_area.OffsetFromOrigin();
96eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch
975f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)  ShowAutofillPopupImpl(element_bounds_in_screen_space,
985f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)                        text_direction == base::i18n::RIGHT_TO_LEFT,
995f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)                        values,
1005f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)                        labels,
1015f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)                        identifiers);
102eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch}
103eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch
104f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)void AwAutofillClient::ShowAutofillPopupImpl(
105eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch    const gfx::RectF& element_bounds,
1065f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)    bool is_rtl,
1075d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    const std::vector<base::string16>& values,
1085d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)    const std::vector<base::string16>& labels,
109eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch    const std::vector<int>& identifiers) {
110eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch  JNIEnv* env = AttachCurrentThread();
111eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch  ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
112eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch  if (obj.is_null())
113eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch    return;
114eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch
115eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch  // We need an array of AutofillSuggestion.
116eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch  size_t count = values.size();
117eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch
118eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch  ScopedJavaLocalRef<jobjectArray> data_array =
119f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)      Java_AwAutofillClient_createAutofillSuggestionArray(env, count);
120eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch
121eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch  for (size_t i = 0; i < count; ++i) {
122eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch    ScopedJavaLocalRef<jstring> name = ConvertUTF16ToJavaString(env, values[i]);
123eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch    ScopedJavaLocalRef<jstring> label =
124eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch        ConvertUTF16ToJavaString(env, labels[i]);
125f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)    Java_AwAutofillClient_addToAutofillSuggestionArray(
126f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)        env, data_array.obj(), i, name.obj(), label.obj(), identifiers[i]);
127eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch  }
128eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch
129f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)  Java_AwAutofillClient_showAutofillPopup(env,
130f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)                                          obj.obj(),
131f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)                                          element_bounds.x(),
132f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)                                          element_bounds.y(),
133f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)                                          element_bounds.width(),
134f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)                                          element_bounds.height(),
1355f1c94371a64b3196d4be9466099bb892df9b88eTorne (Richard Coles)                                          is_rtl,
136f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)                                          data_array.obj());
137eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch}
138eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch
139f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)void AwAutofillClient::UpdateAutofillPopupDataListValues(
140ca12bfac764ba476d6cd062bf1dde12cc64c3f40Ben Murdoch    const std::vector<base::string16>& values,
141ca12bfac764ba476d6cd062bf1dde12cc64c3f40Ben Murdoch    const std::vector<base::string16>& labels) {
1421e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)  // Leaving as an empty method since updating autofill popup window
1431e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)  // dynamically does not seem to be a useful feature for android webview.
1441e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)  // See crrev.com/18102002 if need to implement.
145ca12bfac764ba476d6cd062bf1dde12cc64c3f40Ben Murdoch}
146ca12bfac764ba476d6cd062bf1dde12cc64c3f40Ben Murdoch
147f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)void AwAutofillClient::HideAutofillPopup() {
148eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch  JNIEnv* env = AttachCurrentThread();
149eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch  ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
150eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch  if (obj.is_null())
151eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch    return;
152eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch  delegate_.reset();
153f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)  Java_AwAutofillClient_hideAutofillPopup(env, obj.obj());
154eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch}
155eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch
156f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)bool AwAutofillClient::IsAutocompleteEnabled() {
157eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch  return GetSaveFormData();
158eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch}
159eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch
160f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)void AwAutofillClient::DetectAccountCreationForms(
161f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)    const std::vector<autofill::FormStructure*>& forms) {
162f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)}
16358537e28ecd584eab876aee8be7156509866d23aTorne (Richard Coles)
164f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)void AwAutofillClient::DidFillOrPreviewField(
165a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)    const base::string16& autofilled_value,
166f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)    const base::string16& profile_full_name) {
167f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)}
168a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)
169f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)void AwAutofillClient::SuggestionSelected(JNIEnv* env,
170f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)                                          jobject object,
171f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)                                          jint position) {
172eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch  if (delegate_)
173eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch    delegate_->DidAcceptSuggestion(values_[position], identifiers_[position]);
174eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch}
175eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch
176f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)void AwAutofillClient::HideRequestAutocompleteDialog() {
177eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch  NOTIMPLEMENTED();
178eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch}
179eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch
180f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)void AwAutofillClient::ShowAutofillSettings() {
181eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch  NOTIMPLEMENTED();
182eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch}
183eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch
184f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)void AwAutofillClient::ConfirmSaveCreditCard(
185eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch    const autofill::AutofillMetrics& metric_logger,
186eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch    const base::Closure& save_card_callback) {
187eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch  NOTIMPLEMENTED();
188eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch}
189eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch
190f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)void AwAutofillClient::ShowRequestAutocompleteDialog(
191eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch    const autofill::FormData& form,
192eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch    const GURL& source_url,
193a02191e04bc25c4935f804f2c080ae28663d096dBen Murdoch    const ResultCallback& callback) {
194eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch  NOTIMPLEMENTED();
195eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch}
196eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch
197f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)bool RegisterAwAutofillClient(JNIEnv* env) {
1980529e5d033099cbfc42635f6f6183833b09dff6eBen Murdoch  return RegisterNativesImpl(env);
199eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch}
200eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch
201f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)}  // namespace android_webview
202