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/string16.h" | 7 #include "base/string16.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/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/browser/ui/web_contents_modal_dialog_manager.h" | |
14 #include "chrome/browser/ui/web_contents_modal_dialog_manager_delegate.h" | |
15 #include "chrome/common/chrome_switches.h" | 13 #include "chrome/common/chrome_switches.h" |
| 14 #include "components/web_modal/web_contents_modal_dialog_manager.h" |
| 15 #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h" |
16 #include "content/public/browser/browser_thread.h" | 16 #include "content/public/browser/browser_thread.h" |
17 #include "content/public/browser/render_view_host.h" | 17 #include "content/public/browser/render_view_host.h" |
18 #include "content/public/browser/web_contents.h" | 18 #include "content/public/browser/web_contents.h" |
19 #include "content/public/browser/web_contents_view.h" | 19 #include "content/public/browser/web_contents_view.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/l10n/l10n_util.h" | 22 #include "ui/base/l10n/l10n_util.h" |
23 #include "ui/views/widget/widget.h" | 23 #include "ui/views/widget/widget.h" |
24 #include "ui/views/window/dialog_delegate.h" | 24 #include "ui/views/window/dialog_delegate.h" |
25 | 25 |
26 using content::BrowserThread; | 26 using content::BrowserThread; |
27 using content::PasswordForm; | 27 using content::PasswordForm; |
28 using content::WebContents; | 28 using content::WebContents; |
| 29 using web_modal::WebContentsModalDialogManager; |
29 | 30 |
30 // ---------------------------------------------------------------------------- | 31 // ---------------------------------------------------------------------------- |
31 // LoginHandlerViews | 32 // LoginHandlerViews |
32 | 33 |
33 // This class simply forwards the authentication from the LoginView (on | 34 // This class simply forwards the authentication from the LoginView (on |
34 // 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). |
35 // 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 |
36 // have been called. | 37 // have been called. |
37 class LoginHandlerViews : public LoginHandler, | 38 class LoginHandlerViews : public LoginHandler, |
38 public views::DialogDelegate { | 39 public views::DialogDelegate { |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 views::Widget* dialog_; | 180 views::Widget* dialog_; |
180 | 181 |
181 DISALLOW_COPY_AND_ASSIGN(LoginHandlerViews); | 182 DISALLOW_COPY_AND_ASSIGN(LoginHandlerViews); |
182 }; | 183 }; |
183 | 184 |
184 // static | 185 // static |
185 LoginHandler* LoginHandler::Create(net::AuthChallengeInfo* auth_info, | 186 LoginHandler* LoginHandler::Create(net::AuthChallengeInfo* auth_info, |
186 net::URLRequest* request) { | 187 net::URLRequest* request) { |
187 return new LoginHandlerViews(auth_info, request); | 188 return new LoginHandlerViews(auth_info, request); |
188 } | 189 } |
OLD | NEW |