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

Unified 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: Rename StringFromType to StringIconIdentifierFromType 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/autofill/autofill_dialog_view_delegate.h
diff --git a/chrome/browser/ui/autofill/autofill_dialog_view_delegate.h b/chrome/browser/ui/autofill/autofill_dialog_view_delegate.h
index 7a046dfa9e9dbb6f0134a31d50c397f84ad557b6..9ff9403e69faa1e5a5654ec9e7b0a76d2e99b815 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_view_delegate.h
+++ b/chrome/browser/ui/autofill/autofill_dialog_view_delegate.h
@@ -34,6 +34,9 @@ class MenuModel;
namespace autofill {
+typedef std::map<ServerFieldType, string16> FieldValueMap;
+typedef std::map<ServerFieldType, gfx::Image> FieldIconMap;
+
// This class defines the interface to the controller that the dialog view sees.
class AutofillDialogViewDelegate {
public:
@@ -116,11 +119,20 @@ class AutofillDialogViewDelegate {
// Returns the current state of suggestions for |section|.
virtual SuggestionState SuggestionStateForSection(DialogSection section) = 0;
- // Returns an icon to be displayed along with the input for the given type.
- // |user_input| is the current text in the textfield.
+ // TODO(groby): Remove this deprecated method after Mac starts using
+ // IconsForFields. http://crbug.com/292876
virtual gfx::Image IconForField(ServerFieldType type,
const string16& user_input) const = 0;
+ // Returns the icons to be displayed along with the given |user_inputs| in a
+ // section.
+ virtual FieldIconMap IconsForFields(
+ const FieldValueMap& user_inputs) const = 0;
+
+ // Returns true if the value of this field |type| controls the icons for the
+ // rest of the fields in a section.
+ virtual bool FieldControlsIcons(ServerFieldType type) const = 0;
+
// Decides whether input of |value| is valid for a field of type |type|. If
// valid, the returned string will be empty. Otherwise it will contain an
// error message.

Powered by Google App Engine
This is Rietveld 408576698