| 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" |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 | 222 |
| 223 /////////////////////////////////////////////////////////////////////////////// | 223 /////////////////////////////////////////////////////////////////////////////// |
| 224 // views::ButtonListener implementation: | 224 // views::ButtonListener implementation: |
| 225 | 225 |
| 226 void SSLClientCertificateSelector::ButtonPressed( | 226 void SSLClientCertificateSelector::ButtonPressed( |
| 227 views::Button* sender, const views::Event& event) { | 227 views::Button* sender, const views::Event& event) { |
| 228 if (sender == view_cert_button_) { | 228 if (sender == view_cert_button_) { |
| 229 net::X509Certificate* cert = GetSelectedCert(); | 229 net::X509Certificate* cert = GetSelectedCert(); |
| 230 if (cert) | 230 if (cert) |
| 231 ShowCertificateViewer( | 231 ShowCertificateViewer( |
| 232 tab_contents_->web_contents(), |
| 232 tab_contents_->web_contents()->GetView()->GetTopLevelNativeWindow(), | 233 tab_contents_->web_contents()->GetView()->GetTopLevelNativeWindow(), |
| 233 cert); | 234 cert); |
| 234 } | 235 } |
| 235 } | 236 } |
| 236 | 237 |
| 237 /////////////////////////////////////////////////////////////////////////////// | 238 /////////////////////////////////////////////////////////////////////////////// |
| 238 // views::TableViewObserver implementation: | 239 // views::TableViewObserver implementation: |
| 239 void SSLClientCertificateSelector::OnSelectionChanged() { | 240 void SSLClientCertificateSelector::OnSelectionChanged() { |
| 240 GetDialogClientView()->ok_button()->SetEnabled(!!GetSelectedCert()); | 241 GetDialogClientView()->ok_button()->SetEnabled(!!GetSelectedCert()); |
| 241 } | 242 } |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 const net::HttpNetworkSession* network_session, | 289 const net::HttpNetworkSession* network_session, |
| 289 net::SSLCertRequestInfo* cert_request_info, | 290 net::SSLCertRequestInfo* cert_request_info, |
| 290 const base::Callback<void(net::X509Certificate*)>& callback) { | 291 const base::Callback<void(net::X509Certificate*)>& callback) { |
| 291 DVLOG(1) << __FUNCTION__ << " " << tab_contents; | 292 DVLOG(1) << __FUNCTION__ << " " << tab_contents; |
| 292 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 293 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 293 (new SSLClientCertificateSelector( | 294 (new SSLClientCertificateSelector( |
| 294 tab_contents, network_session, cert_request_info, callback))->Init(); | 295 tab_contents, network_session, cert_request_info, callback))->Init(); |
| 295 } | 296 } |
| 296 | 297 |
| 297 } // namespace browser | 298 } // namespace browser |
| OLD | NEW |