| 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_ui.h" | 5 #include "chrome/browser/ui/webui/certificate_viewer_ui.h" |
| 6 | 6 |
| 7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
| 8 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 8 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 9 #include "chrome/browser/ui/webui/chrome_web_ui_data_source.h" | 9 #include "chrome/browser/ui/webui/chrome_web_ui_data_source.h" |
| 10 #include "chrome/common/url_constants.h" | 10 #include "chrome/common/url_constants.h" |
| 11 #include "content/browser/tab_contents/tab_contents.h" |
| 11 #include "grit/browser_resources.h" | 12 #include "grit/browser_resources.h" |
| 12 #include "grit/generated_resources.h" | 13 #include "grit/generated_resources.h" |
| 13 | 14 |
| 14 CertificateViewerUI::CertificateViewerUI(TabContents* contents) | 15 CertificateViewerUI::CertificateViewerUI(TabContents* contents) |
| 15 #if defined(USE_AURA) | 16 #if defined(USE_AURA) |
| 16 : ConstrainedHtmlUI(contents) { | 17 : ConstrainedHtmlUI(contents) { |
| 17 #else | 18 #else |
| 18 : HtmlDialogUI(contents) { | 19 : HtmlDialogUI(contents) { |
| 19 #endif | 20 #endif |
| 20 | 21 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 html_source->add_resource_path("certificate_viewer.css", | 60 html_source->add_resource_path("certificate_viewer.css", |
| 60 IDR_CERTIFICATE_VIEWER_CSS); | 61 IDR_CERTIFICATE_VIEWER_CSS); |
| 61 html_source->set_default_resource(IDR_CERTIFICATE_VIEWER_HTML); | 62 html_source->set_default_resource(IDR_CERTIFICATE_VIEWER_HTML); |
| 62 | 63 |
| 63 Profile* profile = Profile::FromBrowserContext(contents->browser_context()); | 64 Profile* profile = Profile::FromBrowserContext(contents->browser_context()); |
| 64 profile->GetChromeURLDataManager()->AddDataSource(html_source); | 65 profile->GetChromeURLDataManager()->AddDataSource(html_source); |
| 65 } | 66 } |
| 66 | 67 |
| 67 CertificateViewerUI::~CertificateViewerUI() { | 68 CertificateViewerUI::~CertificateViewerUI() { |
| 68 } | 69 } |
| OLD | NEW |