| 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/ssl_client_certificate_selector.h" | 5 #include "chrome/browser/ssl_client_certificate_selector.h" |
| 6 | 6 |
| 7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 return; | 338 return; |
| 339 gtk_text_buffer_set_text(cert_details_buffer_, | 339 gtk_text_buffer_set_text(cert_details_buffer_, |
| 340 details_strings_[selected].c_str(), | 340 details_strings_[selected].c_str(), |
| 341 details_strings_[selected].size()); | 341 details_strings_[selected].size()); |
| 342 } | 342 } |
| 343 | 343 |
| 344 void SSLClientCertificateSelector::OnViewClicked(GtkWidget* button) { | 344 void SSLClientCertificateSelector::OnViewClicked(GtkWidget* button) { |
| 345 net::X509Certificate* cert = GetSelectedCert(); | 345 net::X509Certificate* cert = GetSelectedCert(); |
| 346 if (cert) { | 346 if (cert) { |
| 347 GtkWidget* toplevel = gtk_widget_get_toplevel(root_widget_.get()); | 347 GtkWidget* toplevel = gtk_widget_get_toplevel(root_widget_.get()); |
| 348 ShowCertificateViewer(GTK_WINDOW(toplevel), cert); | 348 ShowCertificateViewer( |
| 349 tab_contents_->web_contents(), GTK_WINDOW(toplevel), cert); |
| 349 } | 350 } |
| 350 } | 351 } |
| 351 | 352 |
| 352 void SSLClientCertificateSelector::OnCancelClicked(GtkWidget* button) { | 353 void SSLClientCertificateSelector::OnCancelClicked(GtkWidget* button) { |
| 353 CertificateSelected(NULL); | 354 CertificateSelected(NULL); |
| 354 DCHECK(window_); | 355 DCHECK(window_); |
| 355 window_->CloseConstrainedWindow(); | 356 window_->CloseConstrainedWindow(); |
| 356 } | 357 } |
| 357 | 358 |
| 358 void SSLClientCertificateSelector::OnOkClicked(GtkWidget* button) { | 359 void SSLClientCertificateSelector::OnOkClicked(GtkWidget* button) { |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 TabContents* tab_contents, | 392 TabContents* tab_contents, |
| 392 const net::HttpNetworkSession* network_session, | 393 const net::HttpNetworkSession* network_session, |
| 393 net::SSLCertRequestInfo* cert_request_info, | 394 net::SSLCertRequestInfo* cert_request_info, |
| 394 const base::Callback<void(net::X509Certificate*)>& callback) { | 395 const base::Callback<void(net::X509Certificate*)>& callback) { |
| 395 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 396 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 396 (new SSLClientCertificateSelector( | 397 (new SSLClientCertificateSelector( |
| 397 tab_contents, network_session, cert_request_info, callback))->Show(); | 398 tab_contents, network_session, cert_request_info, callback))->Show(); |
| 398 } | 399 } |
| 399 | 400 |
| 400 } // namespace browser | 401 } // namespace browser |
| OLD | NEW |