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

Side by Side Diff: chrome/browser/ui/cocoa/autofill/autofill_dialog_window_controller.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 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 #import "chrome/browser/ui/cocoa/autofill/autofill_dialog_window_controller.h" 5 #import "chrome/browser/ui/cocoa/autofill/autofill_dialog_window_controller.h"
6 6
7 #include "base/mac/foundation_util.h" 7 #include "base/mac/foundation_util.h"
8 #include "base/mac/scoped_nsobject.h" 8 #include "base/mac/scoped_nsobject.h"
9 #include "base/strings/sys_string_conversions.h" 9 #include "base/strings/sys_string_conversions.h"
10 #include "chrome/browser/ui/autofill/autofill_dialog_view_delegate.h" 10 #include "chrome/browser/ui/autofill/autofill_dialog_view_delegate.h"
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 [signInContainer_ setPreferredSize:size]; 459 [signInContainer_ setPreferredSize:size];
460 [self requestRelayout]; 460 [self requestRelayout];
461 } 461 }
462 462
463 @end 463 @end
464 464
465 465
466 @implementation AutofillDialogWindowController (TestableAutofillDialogView) 466 @implementation AutofillDialogWindowController (TestableAutofillDialogView)
467 467
468 - (void)setTextContents:(NSString*)text 468 - (void)setTextContents:(NSString*)text
469 forInput:(const autofill::DetailInput&)input { 469 forType:(autofill::ServerFieldType)type {
470 for (size_t i = autofill::SECTION_MIN; i <= autofill::SECTION_MAX; ++i) { 470 for (size_t i = autofill::SECTION_MIN; i <= autofill::SECTION_MAX; ++i) {
471 autofill::DialogSection section = static_cast<autofill::DialogSection>(i); 471 autofill::DialogSection section = static_cast<autofill::DialogSection>(i);
472 // TODO(groby): Need to find the section for an input directly - wasteful. 472 // TODO(groby): Need to find the section for an input directly - wasteful.
473 [[mainContainer_ sectionForId:section] setFieldValue:text forInput:input]; 473 [[mainContainer_ sectionForId:section] setFieldValue:text forType:type];
474 } 474 }
475 } 475 }
476 476
477 - (void)setTextContents:(NSString*)text 477 - (void)setTextContents:(NSString*)text
478 ofSuggestionForSection:(autofill::DialogSection)section { 478 ofSuggestionForSection:(autofill::DialogSection)section {
479 [[mainContainer_ sectionForId:section] setSuggestionFieldValue:text]; 479 [[mainContainer_ sectionForId:section] setSuggestionFieldValue:text];
480 } 480 }
481 481
482 - (void)activateFieldForInput:(const autofill::DetailInput&)input { 482 - (void)activateFieldForType:(autofill::ServerFieldType)type {
483 for (size_t i = autofill::SECTION_MIN; i <= autofill::SECTION_MAX; ++i) { 483 for (size_t i = autofill::SECTION_MIN; i <= autofill::SECTION_MAX; ++i) {
484 autofill::DialogSection section = static_cast<autofill::DialogSection>(i); 484 autofill::DialogSection section = static_cast<autofill::DialogSection>(i);
485 [[mainContainer_ sectionForId:section] activateFieldForInput:input]; 485 [[mainContainer_ sectionForId:section] activateFieldForType:type];
486 } 486 }
487 } 487 }
488 488
489 - (content::WebContents*)getSignInWebContents { 489 - (content::WebContents*)getSignInWebContents {
490 return [signInContainer_ webContents]; 490 return [signInContainer_ webContents];
491 } 491 }
492 492
493 - (BOOL)isShowingOverlay { 493 - (BOOL)isShowingOverlay {
494 return ![[overlayController_ view] isHidden]; 494 return ![[overlayController_ view] isHidden];
495 } 495 }
496 496
497 @end 497 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698