| OLD | NEW |
| 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 #include "chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.h" | 5 #include "chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/mac/bundle_locations.h" | 8 #include "base/mac/bundle_locations.h" |
| 9 #include "base/mac/foundation_util.h" | 9 #include "base/mac/foundation_util.h" |
| 10 #include "base/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
| (...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 // bottom of the browser window. | 457 // bottom of the browser window. |
| 458 size.height = std::min(size.height, [self maxHeight]); | 458 size.height = std::min(size.height, [self maxHeight]); |
| 459 | 459 |
| 460 return size; | 460 return size; |
| 461 } | 461 } |
| 462 | 462 |
| 463 - (void)performLayout { | 463 - (void)performLayout { |
| 464 NSRect contentRect = NSZeroRect; | 464 NSRect contentRect = NSZeroRect; |
| 465 contentRect.size = [self preferredSize]; | 465 contentRect.size = [self preferredSize]; |
| 466 NSRect clientRect = contentRect; | 466 NSRect clientRect = contentRect; |
| 467 clientRect.origin.y = chrome_style::kClientBottomPadding; | 467 clientRect.origin.y = chrome_style::kTitleTopPadding; |
| 468 clientRect.size.height -= chrome_style::kTitleTopPadding + | 468 clientRect.size.height -= chrome_style::kTitleTopPadding + |
| 469 chrome_style::kClientBottomPadding; | 469 chrome_style::kClientBottomPadding; |
| 470 | 470 |
| 471 [titleTextField_ setStringValue: | 471 [titleTextField_ setStringValue: |
| 472 base::SysUTF16ToNSString(autofillDialog_->delegate()->DialogTitle())]; | 472 base::SysUTF16ToNSString(autofillDialog_->delegate()->DialogTitle())]; |
| 473 [titleTextField_ sizeToFit]; | 473 [titleTextField_ sizeToFit]; |
| 474 | 474 |
| 475 NSRect headerRect, mainRect, titleRect, dummyRect; | 475 NSRect headerRect, mainRect, titleRect, dummyRect; |
| 476 NSDivideRect(clientRect, &headerRect, &mainRect, | 476 NSDivideRect(clientRect, &headerRect, &mainRect, |
| 477 kAccountChooserHeight, NSMinYEdge); | 477 kAccountChooserHeight, NSMinYEdge); |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 670 | 670 |
| 671 - (content::WebContents*)getSignInWebContents { | 671 - (content::WebContents*)getSignInWebContents { |
| 672 return [signInContainer_ webContents]; | 672 return [signInContainer_ webContents]; |
| 673 } | 673 } |
| 674 | 674 |
| 675 - (BOOL)IsShowingOverlay { | 675 - (BOOL)IsShowingOverlay { |
| 676 return ![[overlayController_ view] isHidden]; | 676 return ![[overlayController_ view] isHidden]; |
| 677 } | 677 } |
| 678 | 678 |
| 679 @end | 679 @end |
| OLD | NEW |