OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "android_webview/native/aw_autofill_client.h" | 5 #include "android_webview/browser/aw_autofill_client.h" |
6 | 6 |
7 #include "android_webview/browser/aw_browser_context.h" | 7 #include "android_webview/browser/aw_browser_context.h" |
8 #include "android_webview/browser/aw_content_browser_client.h" | 8 #include "android_webview/browser/aw_content_browser_client.h" |
| 9 #include "android_webview/browser/aw_contents.h" |
9 #include "android_webview/browser/aw_form_database_service.h" | 10 #include "android_webview/browser/aw_form_database_service.h" |
10 #include "android_webview/native/aw_contents.h" | |
11 #include "base/android/jni_android.h" | 11 #include "base/android/jni_android.h" |
12 #include "base/android/jni_string.h" | 12 #include "base/android/jni_string.h" |
13 #include "base/android/scoped_java_ref.h" | 13 #include "base/android/scoped_java_ref.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "components/autofill/core/browser/autofill_popup_delegate.h" | 15 #include "components/autofill/core/browser/autofill_popup_delegate.h" |
16 #include "components/autofill/core/browser/suggestion.h" | 16 #include "components/autofill/core/browser/suggestion.h" |
17 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" | 17 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" |
18 #include "components/autofill/core/common/autofill_pref_names.h" | 18 #include "components/autofill/core/common/autofill_pref_names.h" |
19 #include "components/prefs/pref_registry_simple.h" | 19 #include "components/prefs/pref_registry_simple.h" |
20 #include "components/prefs/pref_service.h" | 20 #include "components/prefs/pref_service.h" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 } | 93 } |
94 | 94 |
95 autofill::PersonalDataManager* AwAutofillClient::GetPersonalDataManager() { | 95 autofill::PersonalDataManager* AwAutofillClient::GetPersonalDataManager() { |
96 return nullptr; | 96 return nullptr; |
97 } | 97 } |
98 | 98 |
99 scoped_refptr<autofill::AutofillWebDataService> | 99 scoped_refptr<autofill::AutofillWebDataService> |
100 AwAutofillClient::GetDatabase() { | 100 AwAutofillClient::GetDatabase() { |
101 android_webview::AwFormDatabaseService* service = | 101 android_webview::AwFormDatabaseService* service = |
102 static_cast<android_webview::AwBrowserContext*>( | 102 static_cast<android_webview::AwBrowserContext*>( |
103 web_contents_->GetBrowserContext())->GetFormDatabaseService(); | 103 web_contents_->GetBrowserContext()) |
| 104 ->GetFormDatabaseService(); |
104 return service->get_autofill_webdata_service(); | 105 return service->get_autofill_webdata_service(); |
105 } | 106 } |
106 | 107 |
107 void AwAutofillClient::ShowAutofillPopup( | 108 void AwAutofillClient::ShowAutofillPopup( |
108 const gfx::RectF& element_bounds, | 109 const gfx::RectF& element_bounds, |
109 base::i18n::TextDirection text_direction, | 110 base::i18n::TextDirection text_direction, |
110 const std::vector<autofill::Suggestion>& suggestions, | 111 const std::vector<autofill::Suggestion>& suggestions, |
111 base::WeakPtr<autofill::AutofillPopupDelegate> delegate) { | 112 base::WeakPtr<autofill::AutofillPopupDelegate> delegate) { |
112 suggestions_ = suggestions; | 113 suggestions_ = suggestions; |
113 delegate_ = delegate; | 114 delegate_ = delegate; |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 | 279 |
279 void AwAutofillClient::ScanCreditCard(const CreditCardScanCallback& callback) { | 280 void AwAutofillClient::ScanCreditCard(const CreditCardScanCallback& callback) { |
280 NOTIMPLEMENTED(); | 281 NOTIMPLEMENTED(); |
281 } | 282 } |
282 | 283 |
283 bool RegisterAwAutofillClient(JNIEnv* env) { | 284 bool RegisterAwAutofillClient(JNIEnv* env) { |
284 return RegisterNativesImpl(env); | 285 return RegisterNativesImpl(env); |
285 } | 286 } |
286 | 287 |
287 } // namespace android_webview | 288 } // namespace android_webview |
OLD | NEW |