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

Side by Side Diff: android_webview/browser/aw_autofill_manager_delegate.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, 5 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "android_webview/browser/aw_autofill_manager_delegate.h"
6 #include "android_webview/browser/aw_browser_context.h"
7 #include "android_webview/browser/aw_content_browser_client.h"
8 #include "android_webview/browser/aw_pref_store.h"
9 #include "base/logging.h"
10 #include "base/prefs/pref_registry_simple.h"
11 #include "base/prefs/pref_service.h"
12 #include "base/prefs/pref_service_builder.h"
13 #include "components/autofill/content/browser/autocheckout/whitelist_manager.h"
14 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h"
15 #include "components/autofill/core/common/autofill_pref_names.h"
16 #include "components/user_prefs/user_prefs.h"
17 #include "content/public/browser/web_contents.h"
18
19 using content::WebContents;
20
21 DEFINE_WEB_CONTENTS_USER_DATA_KEY(android_webview::AwAutofillManagerDelegate);
22
23 namespace android_webview {
24
25 AwAutofillManagerDelegate::AwAutofillManagerDelegate(WebContents* contents)
26 : web_contents_(contents),
27 save_form_data_(false) {
28 }
29
30 AwAutofillManagerDelegate::~AwAutofillManagerDelegate() { }
31
32 void AwAutofillManagerDelegate::SetSaveFormData(bool enabled) {
33 save_form_data_ = enabled;
34 }
35
36 bool AwAutofillManagerDelegate::GetSaveFormData() {
37 return save_form_data_;
38 }
39
40 PrefService* AwAutofillManagerDelegate::GetPrefs() {
41 return user_prefs::UserPrefs::Get(
42 AwContentBrowserClient::GetAwBrowserContext());
43 }
44
45 autofill::PersonalDataManager*
46 AwAutofillManagerDelegate::GetPersonalDataManager() {
47 return NULL;
48 }
49
50 autofill::autocheckout::WhitelistManager*
51 AwAutofillManagerDelegate::GetAutocheckoutWhitelistManager() const {
52 return NULL;
53 }
54
55 void AwAutofillManagerDelegate::HideRequestAutocompleteDialog() {
56 }
57
58 void AwAutofillManagerDelegate::OnAutocheckoutError() {
59 }
60
61 void AwAutofillManagerDelegate::OnAutocheckoutSuccess() {
62 }
63
64 void AwAutofillManagerDelegate::ShowAutofillSettings() {
65 }
66
67 void AwAutofillManagerDelegate::ConfirmSaveCreditCard(
68 const autofill::AutofillMetrics& metric_logger,
69 const autofill::CreditCard& credit_card,
70 const base::Closure& save_card_callback) {
71 }
72
73 void AwAutofillManagerDelegate::ShowAutocheckoutBubble(
74 const gfx::RectF& bounding_box,
75 bool is_google_user,
76 const base::Callback<void(bool)>& callback) {
77 }
78
79 void AwAutofillManagerDelegate::HideAutocheckoutBubble() {
80 }
81
82 void AwAutofillManagerDelegate::ShowRequestAutocompleteDialog(
83 const autofill::FormData& form,
84 const GURL& source_url,
85 autofill::DialogType dialog_type,
86 const base::Callback<void(const autofill::FormStructure*,
87 const std::string&)>& callback) {
88 }
89
90 void AwAutofillManagerDelegate::ShowAutofillPopup(
91 const gfx::RectF& element_bounds,
92 base::i18n::TextDirection text_direction,
93 const std::vector<string16>& values,
94 const std::vector<string16>& labels,
95 const std::vector<string16>& icons,
96 const std::vector<int>& identifiers,
97 base::WeakPtr<autofill::AutofillPopupDelegate> delegate) {
98 }
99
100 void AwAutofillManagerDelegate::HideAutofillPopup() {
101 }
102
103 void AwAutofillManagerDelegate::AddAutocheckoutStep(
104 autofill::AutocheckoutStepType step_type) {
105 }
106
107 void AwAutofillManagerDelegate::UpdateAutocheckoutStep(
108 autofill::AutocheckoutStepType step_type,
109 autofill::AutocheckoutStepStatus step_status) {
110 }
111
112 bool AwAutofillManagerDelegate::IsAutocompleteEnabled() {
113 return GetSaveFormData();
114 }
115
116 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/browser/aw_autofill_manager_delegate.h ('k') | android_webview/browser/aw_browser_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698