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

Side by Side Diff: chrome/browser/ui/cocoa/autofill/autofill_dialog_window_controller.mm

Issue 663643002: requestAutocomplete (desktop): don't get stuck in infinite loop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix tests Created 6 years, 2 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
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 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 - (void)fillSection:(autofill::DialogSection)section 396 - (void)fillSection:(autofill::DialogSection)section
397 forType:(autofill::ServerFieldType)type { 397 forType:(autofill::ServerFieldType)type {
398 [[mainContainer_ sectionForId:section] fillForType:type]; 398 [[mainContainer_ sectionForId:section] fillForType:type];
399 [mainContainer_ updateSaveInChrome]; 399 [mainContainer_ updateSaveInChrome];
400 } 400 }
401 401
402 - (void)updateForErrors { 402 - (void)updateForErrors {
403 [mainContainer_ validate]; 403 [mainContainer_ validate];
404 } 404 }
405 405
406 - (content::NavigationController*)showSignIn { 406 - (content::NavigationController*)showSignIn:(const GURL&)url {
407 [self updateSignInSizeConstraints]; 407 [self updateSignInSizeConstraints];
408 // Ensure |signInContainer_| is set to the same size as |mainContainer_|, to 408 // Ensure |signInContainer_| is set to the same size as |mainContainer_|, to
409 // force its minimum size so that there will not be a resize until the 409 // force its minimum size so that there will not be a resize until the
410 // contents are loaded. 410 // contents are loaded.
411 [[signInContainer_ view] setFrameSize:[[mainContainer_ view] frame].size]; 411 [[signInContainer_ view] setFrameSize:[[mainContainer_ view] frame].size];
412 [signInContainer_ loadSignInPage]; 412 [signInContainer_ loadSignInPage:url];
413 413
414 [[signInContainer_ view] setHidden:NO]; 414 [[signInContainer_ view] setHidden:NO];
415 [self updateMainContainerVisibility]; 415 [self updateMainContainerVisibility];
416 [self requestRelayout]; 416 [self requestRelayout];
417 417
418 return [signInContainer_ navigationController]; 418 return [signInContainer_ navigationController];
419 } 419 }
420 420
421 - (void)getInputs:(autofill::FieldValueMap*)output 421 - (void)getInputs:(autofill::FieldValueMap*)output
422 forSection:(autofill::DialogSection)section { 422 forSection:(autofill::DialogSection)section {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 - (void)onSignInResize:(NSSize)size { 454 - (void)onSignInResize:(NSSize)size {
455 [signInContainer_ setPreferredSize:size]; 455 [signInContainer_ setPreferredSize:size];
456 [self requestRelayout]; 456 [self requestRelayout];
457 } 457 }
458 458
459 - (void)validateSection:(autofill::DialogSection)section { 459 - (void)validateSection:(autofill::DialogSection)section {
460 [[mainContainer_ sectionForId:section] validateFor:autofill::VALIDATE_EDIT]; 460 [[mainContainer_ sectionForId:section] validateFor:autofill::VALIDATE_EDIT];
461 } 461 }
462 462
463 @end 463 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698