| Index: chrome/browser/ui/cocoa/login_prompt_cocoa.mm
|
| diff --git a/chrome/browser/ui/cocoa/login_prompt_cocoa.mm b/chrome/browser/ui/cocoa/login_prompt_cocoa.mm
|
| index 4ba6292430185bc2a1123091a1e953957cbe772b..549c11aac7d4396a7afb2b4a3951750710d3d6c5 100644
|
| --- a/chrome/browser/ui/cocoa/login_prompt_cocoa.mm
|
| +++ b/chrome/browser/ui/cocoa/login_prompt_cocoa.mm
|
| @@ -52,7 +52,8 @@ class LoginHandlerMac : public LoginHandler,
|
| void OnLoginModelDestroying() override {}
|
|
|
| // LoginHandler:
|
| - void BuildViewImpl(const base::string16& explanation,
|
| + void BuildViewImpl(const base::string16& authority,
|
| + const base::string16& explanation,
|
| LoginModelData* login_model_data) override {
|
| DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
|
|
| @@ -64,6 +65,7 @@ class LoginHandlerMac : public LoginHandler,
|
| else
|
| ResetModel();
|
|
|
| + [sheet_controller_ setAuthority:base::SysUTF16ToNSString(authority)];
|
| [sheet_controller_ setExplanation:base::SysUTF16ToNSString(explanation)];
|
|
|
| // Scary thread safety note: This can potentially be called *after* SetAuth
|
| @@ -180,8 +182,19 @@ LoginHandler* LoginHandler::Create(net::AuthChallengeInfo* auth_info,
|
| }
|
| }
|
|
|
| +- (void)setAuthority:(NSString*)authority {
|
| + [authorityField_ setStringValue:authority];
|
| +
|
| + // Resize the text field.
|
| + CGFloat windowDelta = [GTMUILocalizerAndLayoutTweaker
|
| + sizeToFitFixedWidthTextField:authorityField_];
|
| +
|
| + NSRect newFrame = [[self window] frame];
|
| + newFrame.size.height += windowDelta;
|
| + [[self window] setFrame:newFrame display:NO];
|
| +}
|
| +
|
| - (void)setExplanation:(NSString*)explanation {
|
| - // Put in the text.
|
| [explanationField_ setStringValue:explanation];
|
|
|
| // Resize the text field.
|
|
|