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

Unified Diff: chrome/browser/ui/cocoa/autofill/autofill_section_container.mm

Issue 130563003: Change all other AutofillDialogView methods with a const DetailInput& as a param (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 6 years, 11 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/cocoa/autofill/autofill_section_container.mm
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_section_container.mm b/chrome/browser/ui/cocoa/autofill/autofill_section_container.mm
index 2afcb6457131600b41168524196f3f29024d6d98..d67a1b3b5fca636ad9ba70ce9bae75476568bdc7 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_section_container.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_section_container.mm
@@ -702,25 +702,22 @@ bool ShouldOverwriteComboboxes(autofill::DialogSection section,
}
- (void)setFieldValue:(NSString*)text
- forInput:(const autofill::DetailInput&)input {
- if ([self detailInputForType:input.type] != &input)
- return;
-
- NSControl<AutofillInputField>* field = [inputs_ viewWithTag:input.type];
- [field setFieldValue:text];
+ forType:(autofill::ServerFieldType)type {
+ NSControl<AutofillInputField>* field = [inputs_ viewWithTag:type];
+ if (field)
+ [field setFieldValue:text];
}
- (void)setSuggestionFieldValue:(NSString*)text {
[[suggestContainer_ inputField] setFieldValue:text];
}
-- (void)activateFieldForInput:(const autofill::DetailInput&)input {
- if ([self detailInputForType:input.type] != &input)
- return;
-
- NSControl<AutofillInputField>* field = [inputs_ viewWithTag:input.type];
- [[field window] makeFirstResponder:field];
- [self textfieldEditedOrActivated:field edited:NO];
+- (void)activateFieldForType:(autofill::ServerFieldType)type {
+ NSControl<AutofillInputField>* field = [inputs_ viewWithTag:type];
+ if (field) {
+ [[field window] makeFirstResponder:field];
+ [self textfieldEditedOrActivated:field edited:NO];
+ }
}
@end

Powered by Google App Engine
This is Rietveld 408576698