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

Side by Side Diff: components/autofill/core/browser/autofill_external_delegate.h

Issue 2531223003: Expanded Autofill Credit Card Popup Layout Experiment in Android. (Closed)
Patch Set: Uses format string for expiration date label. Consistently returns 0 as default (non-experiment) va… Created 4 years 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 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXTERNAL_DELEGATE_H_ 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXTERNAL_DELEGATE_H_
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXTERNAL_DELEGATE_H_ 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXTERNAL_DELEGATE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 int identifier) override; 44 int identifier) override;
45 void DidAcceptSuggestion(const base::string16& value, 45 void DidAcceptSuggestion(const base::string16& value,
46 int identifier, 46 int identifier,
47 int position) override; 47 int position) override;
48 bool GetDeletionConfirmationText(const base::string16& value, 48 bool GetDeletionConfirmationText(const base::string16& value,
49 int identifier, 49 int identifier,
50 base::string16* title, 50 base::string16* title,
51 base::string16* body) override; 51 base::string16* body) override;
52 bool RemoveSuggestion(const base::string16& value, int identifier) override; 52 bool RemoveSuggestion(const base::string16& value, int identifier) override;
53 void ClearPreviewedForm() override; 53 void ClearPreviewedForm() override;
54 // Returns false for all fields prior to |onQuery|, true for credit card
55 // fields after call to |onQuery|.
56 bool IsCreditCardField() override;
54 57
55 // Records and associates a query_id with web form data. Called 58 // Records and associates a query_id with web form data. Called
56 // when the renderer posts an Autofill query to the browser. |bounds| 59 // when the renderer posts an Autofill query to the browser. |bounds|
57 // is window relative. We might not want to display the warning if a website 60 // is window relative. We might not want to display the warning if a website
58 // has disabled Autocomplete because they have their own popup, and showing 61 // has disabled Autocomplete because they have their own popup, and showing
59 // our popup on to of theirs would be a poor user experience. 62 // our popup on to of theirs would be a poor user experience.
60 virtual void OnQuery(int query_id, 63 virtual void OnQuery(int query_id,
61 const FormData& form, 64 const FormData& form,
62 const FormFieldData& field, 65 const FormFieldData& field,
63 const gfx::RectF& element_bounds); 66 const gfx::RectF& element_bounds);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 // This function should only get called when there is at least one 114 // This function should only get called when there is at least one
112 // multi-field suggestion in the list of suggestions. 115 // multi-field suggestion in the list of suggestions.
113 void ApplyAutofillOptions(std::vector<Suggestion>* suggestions); 116 void ApplyAutofillOptions(std::vector<Suggestion>* suggestions);
114 117
115 // Insert the data list values at the start of the given list, including 118 // Insert the data list values at the start of the given list, including
116 // any required separators. Will also go through |suggestions| and remove 119 // any required separators. Will also go through |suggestions| and remove
117 // duplicate autocomplete (not Autofill) suggestions, keeping their datalist 120 // duplicate autocomplete (not Autofill) suggestions, keeping their datalist
118 // version. 121 // version.
119 void InsertDataListValues(std::vector<Suggestion>* suggestions); 122 void InsertDataListValues(std::vector<Suggestion>* suggestions);
120 123
124 // Returns the text (i.e. |Suggestion| value) for Chrome autofill options.
125 base::string16 GetSettingsSuggestionValue() const;
126
121 AutofillManager* manager_; // weak. 127 AutofillManager* manager_; // weak.
122 128
123 // Provides driver-level context to the shared code of the component. Must 129 // Provides driver-level context to the shared code of the component. Must
124 // outlive this object. 130 // outlive this object.
125 AutofillDriver* driver_; // weak 131 AutofillDriver* driver_; // weak
126 132
127 // The ID of the last request sent for form field Autofill. Used to ignore 133 // The ID of the last request sent for form field Autofill. Used to ignore
128 // out of date responses. 134 // out of date responses.
129 int query_id_; 135 int query_id_;
130 136
131 // The current form and field selected by Autofill. 137 // The current form and field selected by Autofill.
132 FormData query_form_; 138 FormData query_form_;
133 FormFieldData query_field_; 139 FormFieldData query_field_;
134 140
135 // The bounds of the form field that user is interacting with. 141 // The bounds of the form field that user is interacting with.
136 gfx::RectF element_bounds_; 142 gfx::RectF element_bounds_;
137 143
138 // Does the popup include any Autofill profile or credit card suggestions? 144 // Does the popup include any Autofill profile or credit card suggestions?
139 bool has_autofill_suggestions_; 145 bool has_autofill_suggestions_;
140 146
141 // Have we already shown Autofill suggestions for the field the user is 147 // Have we already shown Autofill suggestions for the field the user is
142 // currently editing? Used to keep track of state for metrics logging. 148 // currently editing? Used to keep track of state for metrics logging.
143 bool has_shown_popup_for_current_edit_; 149 bool has_shown_popup_for_current_edit_;
144 150
145 // FIXME 151 // FIXME
Mathieu 2016/12/01 21:59:47 unclear why this is here?
csashi 2016/12/02 05:15:29 By "this", do you mean the "FIXME" or the "is_cred
146 bool should_show_scan_credit_card_; 152 bool should_show_scan_credit_card_;
153 bool is_credit_card_field_;
147 154
148 // Whether the credit card signin promo should be shown to the user. 155 // Whether the credit card signin promo should be shown to the user.
149 bool should_show_cc_signin_promo_; 156 bool should_show_cc_signin_promo_;
150 157
151 // Whether the access Address Book prompt has ever been shown for the current 158 // Whether the access Address Book prompt has ever been shown for the current
152 // |query_form_|. This variable is only used on OSX. 159 // |query_form_|. This variable is only used on OSX.
153 bool has_shown_address_book_prompt; 160 bool has_shown_address_book_prompt;
154 161
155 // The current data list values. 162 // The current data list values.
156 std::vector<base::string16> data_list_values_; 163 std::vector<base::string16> data_list_values_;
157 std::vector<base::string16> data_list_labels_; 164 std::vector<base::string16> data_list_labels_;
158 165
159 base::WeakPtrFactory<AutofillExternalDelegate> weak_ptr_factory_; 166 base::WeakPtrFactory<AutofillExternalDelegate> weak_ptr_factory_;
160 167
161 DISALLOW_COPY_AND_ASSIGN(AutofillExternalDelegate); 168 DISALLOW_COPY_AND_ASSIGN(AutofillExternalDelegate);
162 }; 169 };
163 170
164 } // namespace autofill 171 } // namespace autofill
165 172
166 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXTERNAL_DELEGATE_H_ 173 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXTERNAL_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698