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 "base/strings/string16.h" | 7 #include "base/strings/string16.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "chrome/browser/password_manager/password_manager.h" | 9 #include "chrome/browser/password_manager/password_manager.h" |
10 #include "chrome/browser/tab_contents/tab_util.h" | 10 #include "chrome/browser/tab_contents/tab_util.h" |
11 #include "chrome/browser/ui/views/constrained_window_views.h" | 11 #include "chrome/browser/ui/views/constrained_window_views.h" |
12 #include "chrome/browser/ui/views/login_view.h" | 12 #include "chrome/browser/ui/views/login_view.h" |
13 #include "chrome/common/chrome_switches.h" | 13 #include "chrome/common/chrome_switches.h" |
14 #include "components/web_modal/web_contents_modal_dialog_host.h" | 14 #include "components/web_modal/web_contents_modal_dialog_host.h" |
15 #include "components/web_modal/web_contents_modal_dialog_manager.h" | 15 #include "components/web_modal/web_contents_modal_dialog_manager.h" |
16 #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h" | 16 #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h" |
17 #include "content/public/browser/browser_thread.h" | 17 #include "content/public/browser/browser_thread.h" |
18 #include "content/public/browser/render_view_host.h" | 18 #include "content/public/browser/render_view_host.h" |
19 #include "content/public/browser/web_contents.h" | 19 #include "content/public/browser/web_contents.h" |
20 #include "content/public/browser/web_contents_view.h" | 20 #include "content/public/browser/web_contents_view.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 "ui/base/l10n/l10n_util.h" | 23 #include "ui/base/l10n/l10n_util.h" |
24 #include "ui/views/widget/widget.h" | 24 #include "ui/views/widget/widget.h" |
25 #include "ui/views/window/dialog_delegate.h" | 25 #include "ui/views/window/dialog_delegate.h" |
26 | 26 |
| 27 using autofill::PasswordForm; |
27 using content::BrowserThread; | 28 using content::BrowserThread; |
28 using content::PasswordForm; | |
29 using content::WebContents; | 29 using content::WebContents; |
30 using web_modal::WebContentsModalDialogManager; | 30 using web_modal::WebContentsModalDialogManager; |
31 using web_modal::WebContentsModalDialogManagerDelegate; | 31 using web_modal::WebContentsModalDialogManagerDelegate; |
32 | 32 |
33 // ---------------------------------------------------------------------------- | 33 // ---------------------------------------------------------------------------- |
34 // LoginHandlerViews | 34 // LoginHandlerViews |
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 |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 views::Widget* dialog_; | 184 views::Widget* dialog_; |
185 | 185 |
186 DISALLOW_COPY_AND_ASSIGN(LoginHandlerViews); | 186 DISALLOW_COPY_AND_ASSIGN(LoginHandlerViews); |
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 LoginHandlerViews(auth_info, request); | 192 return new LoginHandlerViews(auth_info, request); |
193 } | 193 } |
OLD | NEW |