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/views/ssl_client_certificate_selector.h" | 5 #include "chrome/browser/ui/views/ssl_client_certificate_selector.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/i18n/time_formatting.h" | 8 #include "base/i18n/time_formatting.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
11 #include "chrome/browser/certificate_viewer.h" | 11 #include "chrome/browser/certificate_viewer.h" |
12 #include "chrome/browser/ui/views/constrained_window_views.h" | 12 #include "chrome/browser/ui/views/constrained_window_views.h" |
13 #include "chrome/browser/ui/web_contents_modal_dialog_manager.h" | 13 #include "components/web_modal/web_contents_modal_dialog_manager.h" |
14 #include "chrome/browser/ui/web_contents_modal_dialog_manager_delegate.h" | 14 #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h" |
15 #include "content/public/browser/browser_thread.h" | 15 #include "content/public/browser/browser_thread.h" |
16 #include "content/public/browser/web_contents.h" | 16 #include "content/public/browser/web_contents.h" |
17 #include "content/public/browser/web_contents_view.h" | 17 #include "content/public/browser/web_contents_view.h" |
18 #include "grit/generated_resources.h" | 18 #include "grit/generated_resources.h" |
19 #include "net/cert/x509_certificate.h" | 19 #include "net/cert/x509_certificate.h" |
20 #include "net/ssl/ssl_cert_request_info.h" | 20 #include "net/ssl/ssl_cert_request_info.h" |
21 #include "ui/base/l10n/l10n_util.h" | 21 #include "ui/base/l10n/l10n_util.h" |
22 #include "ui/base/models/table_model.h" | 22 #include "ui/base/models/table_model.h" |
23 #include "ui/base/models/table_model_observer.h" | 23 #include "ui/base/models/table_model_observer.h" |
24 #include "ui/gfx/native_widget_types.h" | 24 #include "ui/gfx/native_widget_types.h" |
25 #include "ui/views/controls/button/label_button.h" | 25 #include "ui/views/controls/button/label_button.h" |
26 #include "ui/views/controls/label.h" | 26 #include "ui/views/controls/label.h" |
27 #include "ui/views/controls/table/table_view.h" | 27 #include "ui/views/controls/table/table_view.h" |
28 #include "ui/views/layout/grid_layout.h" | 28 #include "ui/views/layout/grid_layout.h" |
29 #include "ui/views/layout/layout_constants.h" | 29 #include "ui/views/layout/layout_constants.h" |
30 #include "ui/views/widget/widget.h" | 30 #include "ui/views/widget/widget.h" |
31 #include "ui/views/window/dialog_client_view.h" | 31 #include "ui/views/window/dialog_client_view.h" |
32 | 32 |
33 using content::BrowserThread; | 33 using content::BrowserThread; |
34 using content::WebContents; | 34 using content::WebContents; |
| 35 using web_modal::WebContentsModalDialogManager; |
35 | 36 |
36 namespace { | 37 namespace { |
37 | 38 |
38 // The dimensions of the certificate selector table view, in pixels. | 39 // The dimensions of the certificate selector table view, in pixels. |
39 static const int kTableViewWidth = 400; | 40 static const int kTableViewWidth = 400; |
40 static const int kTableViewHeight = 100; | 41 static const int kTableViewHeight = 100; |
41 | 42 |
42 } // namespace | 43 } // namespace |
43 | 44 |
44 /////////////////////////////////////////////////////////////////////////////// | 45 /////////////////////////////////////////////////////////////////////////////// |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 const net::HttpNetworkSession* network_session, | 292 const net::HttpNetworkSession* network_session, |
292 net::SSLCertRequestInfo* cert_request_info, | 293 net::SSLCertRequestInfo* cert_request_info, |
293 const chrome::SelectCertificateCallback& callback) { | 294 const chrome::SelectCertificateCallback& callback) { |
294 DVLOG(1) << __FUNCTION__ << " " << contents; | 295 DVLOG(1) << __FUNCTION__ << " " << contents; |
295 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 296 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
296 (new SSLClientCertificateSelector( | 297 (new SSLClientCertificateSelector( |
297 contents, network_session, cert_request_info, callback))->Init(); | 298 contents, network_session, cert_request_info, callback))->Init(); |
298 } | 299 } |
299 | 300 |
300 } // namespace chrome | 301 } // namespace chrome |
OLD | NEW |