| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/login/login_prompt.h" | 5 #include "chrome/browser/ui/login/login_prompt.h" |
| 6 #import "chrome/browser/ui/login/login_prompt_mac.h" | 6 #import "chrome/browser/ui/login/login_prompt_mac.h" |
| 7 | 7 |
| 8 #include "app/l10n_util.h" | 8 #include "app/l10n_util.h" |
| 9 #include "base/mac_util.h" | 9 #include "base/mac/mac_util.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| 11 #include "base/sys_string_conversions.h" | 11 #include "base/sys_string_conversions.h" |
| 12 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
| 13 #include "chrome/browser/browser_thread.h" | 13 #include "chrome/browser/browser_thread.h" |
| 14 #include "chrome/browser/password_manager/password_manager.h" | 14 #include "chrome/browser/password_manager/password_manager.h" |
| 15 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" | 15 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" |
| 16 #include "chrome/browser/tab_contents/navigation_controller.h" | 16 #include "chrome/browser/tab_contents/navigation_controller.h" |
| 17 #include "chrome/browser/tab_contents/tab_contents.h" | 17 #include "chrome/browser/tab_contents/tab_contents.h" |
| 18 #include "chrome/browser/tab_contents/tab_util.h" | 18 #include "chrome/browser/tab_contents/tab_util.h" |
| 19 #include "chrome/browser/ui/cocoa/constrained_window_mac.h" | 19 #include "chrome/browser/ui/cocoa/constrained_window_mac.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 return new LoginHandlerMac(auth_info, request); | 120 return new LoginHandlerMac(auth_info, request); |
| 121 } | 121 } |
| 122 | 122 |
| 123 // ---------------------------------------------------------------------------- | 123 // ---------------------------------------------------------------------------- |
| 124 // LoginHandlerSheet | 124 // LoginHandlerSheet |
| 125 | 125 |
| 126 @implementation LoginHandlerSheet | 126 @implementation LoginHandlerSheet |
| 127 | 127 |
| 128 - (id)initWithLoginHandler:(LoginHandlerMac*)handler { | 128 - (id)initWithLoginHandler:(LoginHandlerMac*)handler { |
| 129 NSString* nibPath = | 129 NSString* nibPath = |
| 130 [mac_util::MainAppBundle() pathForResource:@"HttpAuthLoginSheet" | 130 [base::mac::MainAppBundle() pathForResource:@"HttpAuthLoginSheet" |
| 131 ofType:@"nib"]; | 131 ofType:@"nib"]; |
| 132 if ((self = [super initWithWindowNibPath:nibPath | 132 if ((self = [super initWithWindowNibPath:nibPath |
| 133 owner:self])) { | 133 owner:self])) { |
| 134 handler_ = handler; | 134 handler_ = handler; |
| 135 } | 135 } |
| 136 return self; | 136 return self; |
| 137 } | 137 } |
| 138 | 138 |
| 139 - (void)dealloc { | 139 - (void)dealloc { |
| 140 // The buttons could be in a modal loop, so disconnect them so they cannot | 140 // The buttons could be in a modal loop, so disconnect them so they cannot |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 sizeToFitFixedWidthTextField:explanationField_]; | 181 sizeToFitFixedWidthTextField:explanationField_]; |
| 182 | 182 |
| 183 // Resize the window (no shifting needed due to window layout). | 183 // Resize the window (no shifting needed due to window layout). |
| 184 NSSize windowDelta = NSMakeSize(0, explanationShift); | 184 NSSize windowDelta = NSMakeSize(0, explanationShift); |
| 185 [GTMUILocalizerAndLayoutTweaker | 185 [GTMUILocalizerAndLayoutTweaker |
| 186 resizeWindowWithoutAutoResizingSubViews:[self window] | 186 resizeWindowWithoutAutoResizingSubViews:[self window] |
| 187 delta:windowDelta]; | 187 delta:windowDelta]; |
| 188 } | 188 } |
| 189 | 189 |
| 190 @end | 190 @end |
| OLD | NEW |