Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(345)

Side by Side Diff: chrome/browser/ui/webui/certificate_viewer_webui.cc

Issue 8986007: Move WebUIMessageHandler to its own file in the public directory and put it in the content namesp... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/certificate_viewer_webui.h ('k') | chrome/browser/ui/webui/chromeos/choose_mobile_network_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698