OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 browser::kCryptoModulePasswordClientAuth, | 372 browser::kCryptoModulePasswordClientAuth, |
373 cert_request_info_->host_and_port, | 373 cert_request_info_->host_and_port, |
374 NewCallback(this, &SSLClientCertificateSelector::Unlocked)); | 374 NewCallback(this, &SSLClientCertificateSelector::Unlocked)); |
375 } | 375 } |
376 | 376 |
377 void SSLClientCertificateSelector::OnPromptShown(GtkWidget* widget, | 377 void SSLClientCertificateSelector::OnPromptShown(GtkWidget* widget, |
378 GtkWidget* previous_toplevel) { | 378 GtkWidget* previous_toplevel) { |
379 if (!root_widget_.get() || | 379 if (!root_widget_.get() || |
380 !GTK_WIDGET_TOPLEVEL(gtk_widget_get_toplevel(root_widget_.get()))) | 380 !GTK_WIDGET_TOPLEVEL(gtk_widget_get_toplevel(root_widget_.get()))) |
381 return; | 381 return; |
382 GTK_WIDGET_SET_FLAGS(select_button_, GTK_CAN_DEFAULT); | 382 gtk_widget_set_can_default(select_button_, TRUE); |
383 gtk_widget_grab_default(select_button_); | 383 gtk_widget_grab_default(select_button_); |
384 } | 384 } |
385 | 385 |
386 } // namespace | 386 } // namespace |
387 | 387 |
388 /////////////////////////////////////////////////////////////////////////////// | 388 /////////////////////////////////////////////////////////////////////////////// |
389 // SSLClientAuthHandler platform specific implementation: | 389 // SSLClientAuthHandler platform specific implementation: |
390 | 390 |
391 namespace browser { | 391 namespace browser { |
392 | 392 |
393 void ShowSSLClientCertificateSelector( | 393 void ShowSSLClientCertificateSelector( |
394 TabContents* parent, | 394 TabContents* parent, |
395 net::SSLCertRequestInfo* cert_request_info, | 395 net::SSLCertRequestInfo* cert_request_info, |
396 SSLClientAuthHandler* delegate) { | 396 SSLClientAuthHandler* delegate) { |
397 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 397 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
398 (new SSLClientCertificateSelector(parent, | 398 (new SSLClientCertificateSelector(parent, |
399 cert_request_info, | 399 cert_request_info, |
400 delegate))->Show(); | 400 delegate))->Show(); |
401 } | 401 } |
402 | 402 |
403 } // namespace browser | 403 } // namespace browser |
OLD | NEW |