| 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/webui/certificate_viewer_webui.h" | 5 #include "chrome/browser/ui/webui/certificate_viewer_webui.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/i18n/time_formatting.h" | 9 #include "base/i18n/time_formatting.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 #include "ui/base/l10n/l10n_util.h" | 23 #include "ui/base/l10n/l10n_util.h" |
| 24 #include "grit/generated_resources.h" | 24 #include "grit/generated_resources.h" |
| 25 | 25 |
| 26 #if defined(USE_AURA) | 26 #if defined(USE_AURA) |
| 27 #include "chrome/browser/ui/constrained_window.h" | 27 #include "chrome/browser/ui/constrained_window.h" |
| 28 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 28 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 29 #include "chrome/browser/ui/webui/constrained_html_ui.h" | 29 #include "chrome/browser/ui/webui/constrained_html_ui.h" |
| 30 #endif | 30 #endif |
| 31 | 31 |
| 32 using content::WebContents; | 32 using content::WebContents; |
| 33 using content::WebUIMessageHandler; |
| 33 | 34 |
| 34 namespace { | 35 namespace { |
| 35 | 36 |
| 36 // Default width/height of the dialog. | 37 // Default width/height of the dialog. |
| 37 const int kDefaultWidth = 530; | 38 const int kDefaultWidth = 530; |
| 38 const int kDefaultHeight = 600; | 39 const int kDefaultHeight = 600; |
| 39 | 40 |
| 40 } // namespace | 41 } // namespace |
| 41 | 42 |
| 42 // Shows a certificate using the native or WebUI certificate viewer on | 43 // Shows a certificate using the native or WebUI certificate viewer on |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 cert_sub_fields->Append(node_details = new DictionaryValue()); | 419 cert_sub_fields->Append(node_details = new DictionaryValue()); |
| 419 node_details->SetString("label", | 420 node_details->SetString("label", |
| 420 l10n_util::GetStringUTF8(IDS_CERT_INFO_SHA1_FINGERPRINT_LABEL)); | 421 l10n_util::GetStringUTF8(IDS_CERT_INFO_SHA1_FINGERPRINT_LABEL)); |
| 421 node_details->SetString("payload.val", | 422 node_details->SetString("payload.val", |
| 422 x509_certificate_model::HashCertSHA1(cert)); | 423 x509_certificate_model::HashCertSHA1(cert)); |
| 423 | 424 |
| 424 // Send certificate information to javascript. | 425 // Send certificate information to javascript. |
| 425 web_ui()->CallJavascriptFunction("cert_viewer.getCertificateFields", | 426 web_ui()->CallJavascriptFunction("cert_viewer.getCertificateFields", |
| 426 root_list); | 427 root_list); |
| 427 } | 428 } |
| OLD | NEW |