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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #import "chrome/browser/ui/cocoa/autofill/autofill_section_container.h" 5 #import "chrome/browser/ui/cocoa/autofill/autofill_section_container.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/mac/foundation_util.h" 9 #include "base/mac/foundation_util.h"
10 #include "base/strings/sys_string_conversions.h" 10 #include "base/strings/sys_string_conversions.h"
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 @end 695 @end
696 696
697 697
698 @implementation AutofillSectionContainer (ForTesting) 698 @implementation AutofillSectionContainer (ForTesting)
699 699
700 - (NSControl*)getField:(autofill::ServerFieldType)type { 700 - (NSControl*)getField:(autofill::ServerFieldType)type {
701 return [inputs_ viewWithTag:type]; 701 return [inputs_ viewWithTag:type];
702 } 702 }
703 703
704 - (void)setFieldValue:(NSString*)text 704 - (void)setFieldValue:(NSString*)text
705 forInput:(const autofill::DetailInput&)input { 705 forType:(autofill::ServerFieldType)type {
706 if ([self detailInputForType:input.type] != &input) 706 NSControl<AutofillInputField>* field = [inputs_ viewWithTag:type];
707 return; 707 if (field)
708 708 [field setFieldValue:text];
709 NSControl<AutofillInputField>* field = [inputs_ viewWithTag:input.type];
710 [field setFieldValue:text];
711 } 709 }
712 710
713 - (void)setSuggestionFieldValue:(NSString*)text { 711 - (void)setSuggestionFieldValue:(NSString*)text {
714 [[suggestContainer_ inputField] setFieldValue:text]; 712 [[suggestContainer_ inputField] setFieldValue:text];
715 } 713 }
716 714
717 - (void)activateFieldForInput:(const autofill::DetailInput&)input { 715 - (void)activateFieldForType:(autofill::ServerFieldType)type {
718 if ([self detailInputForType:input.type] != &input) 716 NSControl<AutofillInputField>* field = [inputs_ viewWithTag:type];
719 return; 717 if (field) {
720 718 [[field window] makeFirstResponder:field];
721 NSControl<AutofillInputField>* field = [inputs_ viewWithTag:input.type]; 719 [self textfieldEditedOrActivated:field edited:NO];
722 [[field window] makeFirstResponder:field]; 720 }
723 [self textfieldEditedOrActivated:field edited:NO];
724 } 721 }
725 722
726 @end 723 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698