OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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" |
11 #include "chrome/browser/password_manager/password_manager.h" | 11 #include "chrome/browser/password_manager/password_manager.h" |
12 #include "chrome/browser/tab_contents/tab_util.h" | 12 #include "chrome/browser/tab_contents/tab_util.h" |
13 #include "chrome/browser/ui/gtk/constrained_window_gtk.h" | 13 #include "chrome/browser/ui/gtk/constrained_window_gtk.h" |
14 #include "chrome/browser/ui/gtk/gtk_util.h" | 14 #include "chrome/browser/ui/gtk/gtk_util.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.h" | 16 #include "chrome/browser/ui/tab_contents/tab_contents.h" |
17 #include "content/public/browser/browser_thread.h" | 17 #include "content/public/browser/browser_thread.h" |
18 #include "content/public/browser/web_contents.h" | 18 #include "content/public/browser/web_contents.h" |
19 #include "content/public/browser/web_contents_delegate.h" | 19 #include "content/public/browser/web_contents_delegate.h" |
20 #include "grit/generated_resources.h" | 20 #include "grit/generated_resources.h" |
21 #include "net/url_request/url_request.h" | 21 #include "net/url_request/url_request.h" |
22 #include "ui/base/gtk/gtk_compat.h" | 22 #include "ui/base/gtk/gtk_compat.h" |
23 #include "ui/base/gtk/gtk_hig_constants.h" | 23 #include "ui/base/gtk/gtk_hig_constants.h" |
24 #include "ui/base/gtk/gtk_signal.h" | 24 #include "ui/base/gtk/gtk_signal.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 content::PasswordForm; |
28 using content::WebContents; | 29 using content::WebContents; |
29 using webkit::forms::PasswordForm; | |
30 | 30 |
31 // ---------------------------------------------------------------------------- | 31 // ---------------------------------------------------------------------------- |
32 // LoginHandlerGtk | 32 // LoginHandlerGtk |
33 | 33 |
34 // This class simply forwards the authentication from the LoginView (on | 34 // This class simply forwards the authentication from the LoginView (on |
35 // the UI thread) to the net::URLRequest (on the I/O thread). | 35 // the UI thread) to the net::URLRequest (on the I/O thread). |
36 // This class uses ref counting to ensure that it lives until all InvokeLaters | 36 // This class uses ref counting to ensure that it lives until all InvokeLaters |
37 // have been called. | 37 // have been called. |
38 class LoginHandlerGtk : public LoginHandler, | 38 class LoginHandlerGtk : public LoginHandler, |
39 public ConstrainedWindowGtkDelegate { | 39 public ConstrainedWindowGtkDelegate { |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 // button the default action and mess with the focus. | 184 // button the default action and mess with the focus. |
185 gtk_widget_set_can_default(ok_, TRUE); | 185 gtk_widget_set_can_default(ok_, TRUE); |
186 gtk_widget_grab_default(ok_); | 186 gtk_widget_grab_default(ok_); |
187 } | 187 } |
188 | 188 |
189 // static | 189 // static |
190 LoginHandler* LoginHandler::Create(net::AuthChallengeInfo* auth_info, | 190 LoginHandler* LoginHandler::Create(net::AuthChallengeInfo* auth_info, |
191 net::URLRequest* request) { | 191 net::URLRequest* request) { |
192 return new LoginHandlerGtk(auth_info, request); | 192 return new LoginHandlerGtk(auth_info, request); |
193 } | 193 } |
OLD | NEW |