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/ui/gtk/certificate_viewer.h" | 5 #include "chrome/browser/ui/gtk/certificate_viewer.h" |
6 | 6 |
7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/i18n/time_formatting.h" | 12 #include "base/i18n/time_formatting.h" |
13 #include "base/nss_util.h" | 13 #include "base/nss_util.h" |
14 #include "base/scoped_ptr.h" | 14 #include "base/scoped_ptr.h" |
15 #include "base/string_number_conversions.h" | 15 #include "base/string_number_conversions.h" |
16 #include "base/time.h" | 16 #include "base/time.h" |
17 #include "base/utf_string_conversions.h" | 17 #include "base/utf_string_conversions.h" |
18 #include "chrome/browser/ui/gtk/certificate_dialogs.h" | 18 #include "chrome/browser/ui/gtk/certificate_dialogs.h" |
19 #include "chrome/browser/ui/gtk/gtk_util.h" | 19 #include "chrome/browser/ui/gtk/gtk_util.h" |
20 #include "chrome/common/net/x509_certificate_model.h" | 20 #include "chrome/common/net/x509_certificate_model.h" |
21 #include "gfx/gtk_util.h" | |
22 #include "grit/generated_resources.h" | 21 #include "grit/generated_resources.h" |
23 #include "net/base/x509_certificate.h" | 22 #include "net/base/x509_certificate.h" |
24 #include "ui/base/l10n/l10n_util.h" | 23 #include "ui/base/l10n/l10n_util.h" |
| 24 #include "ui/gfx/gtk_util.h" |
25 | 25 |
26 namespace { | 26 namespace { |
27 | 27 |
28 const char kDetailsFontFamily[] = "monospace"; | 28 const char kDetailsFontFamily[] = "monospace"; |
29 | 29 |
30 //////////////////////////////////////////////////////////////////////////////// | 30 //////////////////////////////////////////////////////////////////////////////// |
31 // Gtk utility functions. | 31 // Gtk utility functions. |
32 | 32 |
33 void AddTitle(GtkTable* table, int row, const std::string& text) { | 33 void AddTitle(GtkTable* table, int row, const std::string& text) { |
34 gtk_table_attach_defaults(table, | 34 gtk_table_attach_defaults(table, |
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
685 net::X509Certificate::OSCertHandle cert) { | 685 net::X509Certificate::OSCertHandle cert) { |
686 net::X509Certificate::OSCertHandles cert_chain; | 686 net::X509Certificate::OSCertHandles cert_chain; |
687 x509_certificate_model::GetCertChainFromCert(cert, &cert_chain); | 687 x509_certificate_model::GetCertChainFromCert(cert, &cert_chain); |
688 (new CertificateViewer(parent, cert_chain))->Show(); | 688 (new CertificateViewer(parent, cert_chain))->Show(); |
689 } | 689 } |
690 | 690 |
691 void ShowCertificateViewer(gfx::NativeWindow parent, | 691 void ShowCertificateViewer(gfx::NativeWindow parent, |
692 net::X509Certificate* cert) { | 692 net::X509Certificate* cert) { |
693 ShowCertificateViewer(parent, cert->os_cert_handle()); | 693 ShowCertificateViewer(parent, cert->os_cert_handle()); |
694 } | 694 } |
OLD | NEW |