| OLD | NEW |
| 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 Loading... |
| 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)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 Loading... |
| 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 |
| OLD | NEW |