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

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

Issue 85863003: Change DetailOutputMap to FieldValueMap (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_CONTROLLER_IMPL_H_ 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_
7 7
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 virtual FieldIconMap IconsForFields(const FieldValueMap& user_inputs) 130 virtual FieldIconMap IconsForFields(const FieldValueMap& user_inputs)
131 const OVERRIDE; 131 const OVERRIDE;
132 virtual bool FieldControlsIcons(ServerFieldType type) const OVERRIDE; 132 virtual bool FieldControlsIcons(ServerFieldType type) const OVERRIDE;
133 virtual string16 TooltipForField(ServerFieldType type) const OVERRIDE; 133 virtual string16 TooltipForField(ServerFieldType type) const OVERRIDE;
134 virtual bool InputIsEditable(const DetailInput& input, DialogSection section) 134 virtual bool InputIsEditable(const DetailInput& input, DialogSection section)
135 OVERRIDE; 135 OVERRIDE;
136 virtual string16 InputValidityMessage(DialogSection section, 136 virtual string16 InputValidityMessage(DialogSection section,
137 ServerFieldType type, 137 ServerFieldType type,
138 const string16& value) OVERRIDE; 138 const string16& value) OVERRIDE;
139 virtual ValidityMessages InputsAreValid( 139 virtual ValidityMessages InputsAreValid(
140 DialogSection section, const DetailOutputMap& inputs) OVERRIDE; 140 DialogSection section, const FieldValueMap& inputs) OVERRIDE;
141 virtual void UserEditedOrActivatedInput(DialogSection section, 141 virtual void UserEditedOrActivatedInput(DialogSection section,
142 const DetailInput* input, 142 ServerFieldType type,
143 gfx::NativeView parent_view, 143 gfx::NativeView parent_view,
144 const gfx::Rect& content_bounds, 144 const gfx::Rect& content_bounds,
145 const string16& field_contents, 145 const string16& field_contents,
146 bool was_edit) OVERRIDE; 146 bool was_edit) OVERRIDE;
147 virtual bool HandleKeyPressEventInInput( 147 virtual bool HandleKeyPressEventInInput(
148 const content::NativeWebKeyboardEvent& event) OVERRIDE; 148 const content::NativeWebKeyboardEvent& event) OVERRIDE;
149 virtual void FocusMoved() OVERRIDE; 149 virtual void FocusMoved() OVERRIDE;
150 virtual bool ShouldShowErrorBubble() const OVERRIDE; 150 virtual bool ShouldShowErrorBubble() const OVERRIDE;
151 virtual void ViewClosed() OVERRIDE; 151 virtual void ViewClosed() OVERRIDE;
152 virtual std::vector<DialogNotification> CurrentNotifications() OVERRIDE; 152 virtual std::vector<DialogNotification> CurrentNotifications() OVERRIDE;
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 void ResetSectionInput(DialogSection section); 349 void ResetSectionInput(DialogSection section);
350 350
351 // Force |section| into edit mode if the current suggestion is invalid. 351 // Force |section| into edit mode if the current suggestion is invalid.
352 void ShowEditUiIfBadSuggestion(DialogSection section); 352 void ShowEditUiIfBadSuggestion(DialogSection section);
353 353
354 // Whether the |value| of |input| should be preserved on account change. 354 // Whether the |value| of |input| should be preserved on account change.
355 bool InputWasEdited(ServerFieldType type, 355 bool InputWasEdited(ServerFieldType type,
356 const base::string16& value); 356 const base::string16& value);
357 357
358 // Takes a snapshot of the newly inputted user data in |view_| (if it exists). 358 // Takes a snapshot of the newly inputted user data in |view_| (if it exists).
359 DetailOutputMap TakeUserInputSnapshot(); 359 FieldValueMap TakeUserInputSnapshot();
360 360
361 // Fills the detail inputs from a previously taken user input snapshot. Does 361 // Fills the detail inputs from a previously taken user input snapshot. Does
362 // not update the view. 362 // not update the view.
363 void RestoreUserInputFromSnapshot(const DetailOutputMap& snapshot); 363 void RestoreUserInputFromSnapshot(const FieldValueMap& snapshot);
364 364
365 // Tells the view to update |section|. 365 // Tells the view to update |section|.
366 void UpdateSection(DialogSection section); 366 void UpdateSection(DialogSection section);
367 367
368 // Tells |view_| to update the validity status of its detail inputs (if 368 // Tells |view_| to update the validity status of its detail inputs (if
369 // |view_| is non-null). Currently this is used solely for highlighting 369 // |view_| is non-null). Currently this is used solely for highlighting
370 // invalid suggestions, so if no sections are based on existing data, 370 // invalid suggestions, so if no sections are based on existing data,
371 // |view_->UpdateForErrors()| is not called. 371 // |view_->UpdateForErrors()| is not called.
372 void UpdateForErrors(); 372 void UpdateForErrors();
373 373
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 758
759 // A username string we display in the card scrambling/generated overlay. 759 // A username string we display in the card scrambling/generated overlay.
760 base::string16 submitted_cardholder_name_; 760 base::string16 submitted_cardholder_name_;
761 761
762 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); 762 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl);
763 }; 763 };
764 764
765 } // namespace autofill 765 } // namespace autofill
766 766
767 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ 767 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698