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/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 CreateCertTable(); | 140 CreateCertTable(); |
141 layout->StartRow(1, column_set_id); | 141 layout->StartRow(1, column_set_id); |
142 layout->AddView(table_->CreateParentIfNecessary(), 1, 1, | 142 layout->AddView(table_->CreateParentIfNecessary(), 1, 1, |
143 views::GridLayout::FILL, | 143 views::GridLayout::FILL, |
144 views::GridLayout::FILL, kTableViewWidth, kTableViewHeight); | 144 views::GridLayout::FILL, kTableViewWidth, kTableViewHeight); |
145 | 145 |
146 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); | 146 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); |
147 | 147 |
148 StartObserving(); | 148 StartObserving(); |
149 | 149 |
| 150 // TODO(gbillock): Use PopupManager here. |
150 WebContentsModalDialogManager* web_contents_modal_dialog_manager = | 151 WebContentsModalDialogManager* web_contents_modal_dialog_manager = |
151 WebContentsModalDialogManager::FromWebContents(web_contents_); | 152 WebContentsModalDialogManager::FromWebContents(web_contents_); |
152 WebContentsModalDialogManagerDelegate* modal_delegate = | 153 WebContentsModalDialogManagerDelegate* modal_delegate = |
153 web_contents_modal_dialog_manager->delegate(); | 154 web_contents_modal_dialog_manager->delegate(); |
154 DCHECK(modal_delegate); | 155 DCHECK(modal_delegate); |
155 window_ = views::Widget::CreateWindowAsFramelessChild( | 156 window_ = views::Widget::CreateWindowAsFramelessChild( |
156 this, modal_delegate->GetWebContentsModalDialogHost()->GetHostView()); | 157 this, modal_delegate->GetWebContentsModalDialogHost()->GetHostView()); |
157 web_contents_modal_dialog_manager->ShowModalDialog( | 158 web_contents_modal_dialog_manager->ShowModalDialog( |
158 window_->GetNativeView()); | 159 window_->GetNativeView()); |
159 | 160 |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 const net::HttpNetworkSession* network_session, | 309 const net::HttpNetworkSession* network_session, |
309 net::SSLCertRequestInfo* cert_request_info, | 310 net::SSLCertRequestInfo* cert_request_info, |
310 const chrome::SelectCertificateCallback& callback) { | 311 const chrome::SelectCertificateCallback& callback) { |
311 DVLOG(1) << __FUNCTION__ << " " << contents; | 312 DVLOG(1) << __FUNCTION__ << " " << contents; |
312 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 313 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
313 (new SSLClientCertificateSelector( | 314 (new SSLClientCertificateSelector( |
314 contents, network_session, cert_request_info, callback))->Init(); | 315 contents, network_session, cert_request_info, callback))->Init(); |
315 } | 316 } |
316 | 317 |
317 } // namespace chrome | 318 } // namespace chrome |
OLD | NEW |