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