| 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/ssl_client_certificate_selector.h" | 5 #include "chrome/browser/ssl/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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 | 190 |
| 191 StartObserving(); | 191 StartObserving(); |
| 192 } | 192 } |
| 193 | 193 |
| 194 SSLClientCertificateSelector::~SSLClientCertificateSelector() { | 194 SSLClientCertificateSelector::~SSLClientCertificateSelector() { |
| 195 root_widget_.Destroy(); | 195 root_widget_.Destroy(); |
| 196 } | 196 } |
| 197 | 197 |
| 198 void SSLClientCertificateSelector::Show() { | 198 void SSLClientCertificateSelector::Show() { |
| 199 DCHECK(!window_); | 199 DCHECK(!window_); |
| 200 window_ = new ConstrainedWindowGtk(tab_contents_, this); | 200 window_ = new ConstrainedWindowGtk(tab_contents_->web_contents(), this); |
| 201 } | 201 } |
| 202 | 202 |
| 203 void SSLClientCertificateSelector::OnCertSelectedByNotification() { | 203 void SSLClientCertificateSelector::OnCertSelectedByNotification() { |
| 204 DCHECK(window_); | 204 DCHECK(window_); |
| 205 window_->CloseConstrainedWindow(); | 205 window_->CloseConstrainedWindow(); |
| 206 } | 206 } |
| 207 | 207 |
| 208 GtkWidget* SSLClientCertificateSelector::GetFocusWidget() { | 208 GtkWidget* SSLClientCertificateSelector::GetFocusWidget() { |
| 209 return select_button_; | 209 return select_button_; |
| 210 } | 210 } |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 const net::HttpNetworkSession* network_session, | 390 const net::HttpNetworkSession* network_session, |
| 391 net::SSLCertRequestInfo* cert_request_info, | 391 net::SSLCertRequestInfo* cert_request_info, |
| 392 const base::Callback<void(net::X509Certificate*)>& callback) { | 392 const base::Callback<void(net::X509Certificate*)>& callback) { |
| 393 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 393 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 394 TabContents* tab_contents = TabContents::FromWebContents(contents); | 394 TabContents* tab_contents = TabContents::FromWebContents(contents); |
| 395 (new SSLClientCertificateSelector( | 395 (new SSLClientCertificateSelector( |
| 396 tab_contents, network_session, cert_request_info, callback))->Show(); | 396 tab_contents, network_session, cert_request_info, callback))->Show(); |
| 397 } | 397 } |
| 398 | 398 |
| 399 } // namespace chrome | 399 } // namespace chrome |
| OLD | NEW |