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

Side by Side Diff: chrome/browser/ui/autofill/autofill_dialog_view_delegate.h

Issue 23756007: [rac] Show amex specific cvc hint (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move icon dependency logic into controller for testability Created 7 years, 3 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 | Annotate | Revision Log
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 CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_DELEGATE_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_DELEGATE_H_ 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_DELEGATE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 virtual SuggestionState SuggestionStateForSection(DialogSection section) = 0; 117 virtual SuggestionState SuggestionStateForSection(DialogSection section) = 0;
118 118
119 // Should be called when the user starts editing of the section. 119 // Should be called when the user starts editing of the section.
120 virtual void EditClickedForSection(DialogSection section) = 0; 120 virtual void EditClickedForSection(DialogSection section) = 0;
121 121
122 // Returns an icon to be displayed along with the input for the given type. 122 // Returns an icon to be displayed along with the input for the given type.
123 // |user_input| is the current text in the textfield. 123 // |user_input| is the current text in the textfield.
124 virtual gfx::Image IconForField(ServerFieldType type, 124 virtual gfx::Image IconForField(ServerFieldType type,
125 const string16& user_input) const = 0; 125 const string16& user_input) const = 0;
126 126
127 // Returns true if the icon of this field type |depdendent_type| depends on
128 // the value of another field. For example, returns true for CVC, because CVC
129 // hint images depend on credit card type.
130 virtual bool IsIconDependentField(ServerFieldType dependent_type) const = 0;
131
132 // Returns true if the value of this field type |dependency_type| controls the
133 // icon of another field. Sets |dependent_type| to the type of the dependent
134 // field. For example, returns true for credit card number, because some
135 // credit card types have different CVC hint images.
136 virtual bool IsIconDependencyField(ServerFieldType dependency_type,
137 ServerFieldType* dependent_type) const = 0;
138
127 // Decides whether input of |value| is valid for a field of type |type|. If 139 // Decides whether input of |value| is valid for a field of type |type|. If
128 // valid, the returned string will be empty. Otherwise it will contain an 140 // valid, the returned string will be empty. Otherwise it will contain an
129 // error message. 141 // error message.
130 virtual string16 InputValidityMessage(DialogSection section, 142 virtual string16 InputValidityMessage(DialogSection section,
131 ServerFieldType type, 143 ServerFieldType type,
132 const string16& value) = 0; 144 const string16& value) = 0;
133 145
134 146
135 // Decides whether the combination of all |inputs| is valid, returns a 147 // Decides whether the combination of all |inputs| is valid, returns a
136 // map of field types to error strings. 148 // map of field types to error strings.
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 // The web contents that prompted the dialog. 207 // The web contents that prompted the dialog.
196 virtual content::WebContents* GetWebContents() = 0; 208 virtual content::WebContents* GetWebContents() = 0;
197 209
198 protected: 210 protected:
199 virtual ~AutofillDialogViewDelegate(); 211 virtual ~AutofillDialogViewDelegate();
200 }; 212 };
201 213
202 } // namespace autofill 214 } // namespace autofill
203 215
204 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_DELEGATE_H_ 216 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698