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

Side by Side Diff: android_webview/native/aw_autofill_manager_delegate.cc

Issue 71683003: Have AutofillManagerDelegate supply the AutofillWebDataService to core code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unittests, respond to reviews Created 7 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_manager_delegate.h" 5 #include "android_webview/native/aw_autofill_manager_delegate.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_pref_store.h" 9 #include "android_webview/browser/aw_pref_store.h"
10 #include "android_webview/native/aw_contents.h" 10 #include "android_webview/native/aw_contents.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 PrefService* AwAutofillManagerDelegate::GetPrefs() { 63 PrefService* AwAutofillManagerDelegate::GetPrefs() {
64 return user_prefs::UserPrefs::Get( 64 return user_prefs::UserPrefs::Get(
65 AwContentBrowserClient::GetAwBrowserContext()); 65 AwContentBrowserClient::GetAwBrowserContext());
66 } 66 }
67 67
68 autofill::PersonalDataManager* 68 autofill::PersonalDataManager*
69 AwAutofillManagerDelegate::GetPersonalDataManager() { 69 AwAutofillManagerDelegate::GetPersonalDataManager() {
70 return NULL; 70 return NULL;
71 } 71 }
72 72
73 scoped_refptr<autofill::AutofillWebDataService> GetDatabase() {
74 return autofill::AutofillWebDataService::FromBrowserContext(
75 web_contents_->GetBrowserContext());
76 }
77
73 void AwAutofillManagerDelegate::ShowAutofillPopup( 78 void AwAutofillManagerDelegate::ShowAutofillPopup(
74 const gfx::RectF& element_bounds, 79 const gfx::RectF& element_bounds,
75 base::i18n::TextDirection text_direction, 80 base::i18n::TextDirection text_direction,
76 const std::vector<string16>& values, 81 const std::vector<string16>& values,
77 const std::vector<string16>& labels, 82 const std::vector<string16>& labels,
78 const std::vector<string16>& icons, 83 const std::vector<string16>& icons,
79 const std::vector<int>& identifiers, 84 const std::vector<int>& identifiers,
80 base::WeakPtr<autofill::AutofillPopupDelegate> delegate) { 85 base::WeakPtr<autofill::AutofillPopupDelegate> delegate) {
81 86
82 values_ = values; 87 values_ = values;
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 const GURL& source_url, 187 const GURL& source_url,
183 const base::Callback<void(const autofill::FormStructure*)>& callback) { 188 const base::Callback<void(const autofill::FormStructure*)>& callback) {
184 NOTIMPLEMENTED(); 189 NOTIMPLEMENTED();
185 } 190 }
186 191
187 bool RegisterAwAutofillManagerDelegate(JNIEnv* env) { 192 bool RegisterAwAutofillManagerDelegate(JNIEnv* env) {
188 return RegisterNativesImpl(env) >= 0; 193 return RegisterNativesImpl(env) >= 0;
189 } 194 }
190 195
191 } // namespace android_webview 196 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698