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 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 [[mainContainer_ sectionForId:section] fillForInput:input]; | 389 [[mainContainer_ sectionForId:section] fillForInput:input]; |
390 [mainContainer_ updateSaveInChrome]; | 390 [mainContainer_ updateSaveInChrome]; |
391 } | 391 } |
392 | 392 |
393 - (void)updateForErrors { | 393 - (void)updateForErrors { |
394 [mainContainer_ validate]; | 394 [mainContainer_ validate]; |
395 } | 395 } |
396 | 396 |
397 - (content::NavigationController*)showSignIn { | 397 - (content::NavigationController*)showSignIn { |
398 [self updateSignInSizeConstraints]; | 398 [self updateSignInSizeConstraints]; |
| 399 // Ensure |signInContainer_| is set to the same size as |mainContainer_|, to |
| 400 // force its minimum size so that there will not be a resize until the |
| 401 // contents are loaded. |
| 402 [[signInContainer_ view] setFrameSize:[[mainContainer_ view] frame].size]; |
399 [signInContainer_ loadSignInPage]; | 403 [signInContainer_ loadSignInPage]; |
| 404 |
400 [[signInContainer_ view] setHidden:NO]; | 405 [[signInContainer_ view] setHidden:NO]; |
401 [self updateMainContainerVisibility]; | 406 [self updateMainContainerVisibility]; |
402 [self requestRelayout]; | 407 [self requestRelayout]; |
403 | 408 |
404 return [signInContainer_ navigationController]; | 409 return [signInContainer_ navigationController]; |
405 } | 410 } |
406 | 411 |
407 - (void)getInputs:(autofill::FieldValueMap*)output | 412 - (void)getInputs:(autofill::FieldValueMap*)output |
408 forSection:(autofill::DialogSection)section { | 413 forSection:(autofill::DialogSection)section { |
409 [[mainContainer_ sectionForId:section] getInputs:output]; | 414 [[mainContainer_ sectionForId:section] getInputs:output]; |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 | 475 |
471 - (content::WebContents*)getSignInWebContents { | 476 - (content::WebContents*)getSignInWebContents { |
472 return [signInContainer_ webContents]; | 477 return [signInContainer_ webContents]; |
473 } | 478 } |
474 | 479 |
475 - (BOOL)isShowingOverlay { | 480 - (BOOL)isShowingOverlay { |
476 return ![[overlayController_ view] isHidden]; | 481 return ![[overlayController_ view] isHidden]; |
477 } | 482 } |
478 | 483 |
479 @end | 484 @end |
OLD | NEW |