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 | 6 |
7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
8 | 8 |
9 #include "base/string16.h" | 9 #include "base/string16.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "content/browser/tab_contents/tab_contents_delegate.h" | 21 #include "content/browser/tab_contents/tab_contents_delegate.h" |
22 #include "content/public/browser/browser_thread.h" | 22 #include "content/public/browser/browser_thread.h" |
23 #include "grit/generated_resources.h" | 23 #include "grit/generated_resources.h" |
24 #include "net/url_request/url_request.h" | 24 #include "net/url_request/url_request.h" |
25 #include "ui/base/gtk/gtk_compat.h" | 25 #include "ui/base/gtk/gtk_compat.h" |
26 #include "ui/base/gtk/gtk_hig_constants.h" | 26 #include "ui/base/gtk/gtk_hig_constants.h" |
27 #include "ui/base/gtk/gtk_signal.h" | 27 #include "ui/base/gtk/gtk_signal.h" |
28 #include "ui/base/l10n/l10n_util.h" | 28 #include "ui/base/l10n/l10n_util.h" |
29 | 29 |
30 using content::BrowserThread; | 30 using content::BrowserThread; |
31 using webkit_glue::PasswordForm; | 31 using webkit::forms::PasswordForm; |
32 | 32 |
33 // ---------------------------------------------------------------------------- | 33 // ---------------------------------------------------------------------------- |
34 // LoginHandlerGtk | 34 // LoginHandlerGtk |
35 | 35 |
36 // This class simply forwards the authentication from the LoginView (on | 36 // This class simply forwards the authentication from the LoginView (on |
37 // the UI thread) to the net::URLRequest (on the I/O thread). | 37 // the UI thread) to the net::URLRequest (on the I/O thread). |
38 // This class uses ref counting to ensure that it lives until all InvokeLaters | 38 // This class uses ref counting to ensure that it lives until all InvokeLaters |
39 // have been called. | 39 // have been called. |
40 class LoginHandlerGtk : public LoginHandler, | 40 class LoginHandlerGtk : public LoginHandler, |
41 public ConstrainedWindowGtkDelegate { | 41 public ConstrainedWindowGtkDelegate { |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 // button the default action and mess with the focus. | 185 // button the default action and mess with the focus. |
186 gtk_widget_set_can_default(ok_, TRUE); | 186 gtk_widget_set_can_default(ok_, TRUE); |
187 gtk_widget_grab_default(ok_); | 187 gtk_widget_grab_default(ok_); |
188 } | 188 } |
189 | 189 |
190 // static | 190 // static |
191 LoginHandler* LoginHandler::Create(net::AuthChallengeInfo* auth_info, | 191 LoginHandler* LoginHandler::Create(net::AuthChallengeInfo* auth_info, |
192 net::URLRequest* request) { | 192 net::URLRequest* request) { |
193 return new LoginHandlerGtk(auth_info, request); | 193 return new LoginHandlerGtk(auth_info, request); |
194 } | 194 } |
OLD | NEW |