| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/mac/mac_util.h" | 8 #include "base/mac/mac_util.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
| 11 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
| 12 #include "chrome/browser/password_manager/password_manager.h" | 12 #include "chrome/browser/password_manager/password_manager.h" |
| 13 #include "chrome/browser/tab_contents/tab_util.h" | 13 #include "chrome/browser/tab_contents/tab_util.h" |
| 14 #include "chrome/browser/ui/cocoa/constrained_window_mac.h" | 14 #include "chrome/browser/ui/cocoa/constrained_window_mac.h" |
| 15 #include "chrome/browser/ui/login/login_model.h" | 15 #include "chrome/browser/ui/login/login_model.h" |
| 16 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 16 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 17 #include "content/browser/renderer_host/resource_dispatcher_host.h" | 17 #include "content/browser/renderer_host/resource_dispatcher_host.h" |
| 18 #include "content/browser/tab_contents/navigation_controller.h" | 18 #include "content/browser/tab_contents/navigation_controller.h" |
| 19 #include "content/browser/tab_contents/tab_contents.h" | 19 #include "content/browser/tab_contents/tab_contents.h" |
| 20 #include "content/public/browser/browser_thread.h" | 20 #include "content/public/browser/browser_thread.h" |
| 21 #include "grit/generated_resources.h" | 21 #include "grit/generated_resources.h" |
| 22 #include "net/url_request/url_request.h" | 22 #include "net/url_request/url_request.h" |
| 23 #include "third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h" | 23 #include "third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h" |
| 24 #include "ui/base/l10n/l10n_util.h" | 24 #include "ui/base/l10n/l10n_util.h" |
| 25 | 25 |
| 26 using content::BrowserThread; |
| 26 using webkit_glue::PasswordForm; | 27 using webkit_glue::PasswordForm; |
| 27 | 28 |
| 28 // ---------------------------------------------------------------------------- | 29 // ---------------------------------------------------------------------------- |
| 29 // LoginHandlerMac | 30 // LoginHandlerMac |
| 30 | 31 |
| 31 // This class simply forwards the authentication from the LoginView (on | 32 // This class simply forwards the authentication from the LoginView (on |
| 32 // the UI thread) to the net::URLRequest (on the I/O thread). | 33 // the UI thread) to the net::URLRequest (on the I/O thread). |
| 33 // This class uses ref counting to ensure that it lives until all InvokeLaters | 34 // This class uses ref counting to ensure that it lives until all InvokeLaters |
| 34 // have been called. | 35 // have been called. |
| 35 class LoginHandlerMac : public LoginHandler, | 36 class LoginHandlerMac : public LoginHandler, |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 sizeToFitFixedWidthTextField:explanationField_]; | 189 sizeToFitFixedWidthTextField:explanationField_]; |
| 189 | 190 |
| 190 // Resize the window (no shifting needed due to window layout). | 191 // Resize the window (no shifting needed due to window layout). |
| 191 NSSize windowDelta = NSMakeSize(0, explanationShift); | 192 NSSize windowDelta = NSMakeSize(0, explanationShift); |
| 192 [GTMUILocalizerAndLayoutTweaker | 193 [GTMUILocalizerAndLayoutTweaker |
| 193 resizeWindowWithoutAutoResizingSubViews:[self window] | 194 resizeWindowWithoutAutoResizingSubViews:[self window] |
| 194 delta:windowDelta]; | 195 delta:windowDelta]; |
| 195 } | 196 } |
| 196 | 197 |
| 197 @end | 198 @end |
| OLD | NEW |