OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/help/help_ui.h" | 5 #include "chrome/browser/ui/webui/help/help_ui.h" |
6 | 6 |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/browser/ui/webui/help/help_handler.h" | 9 #include "chrome/browser/ui/webui/help/help_handler.h" |
10 #include "chrome/common/url_constants.h" | 10 #include "chrome/common/url_constants.h" |
11 #include "chrome/grit/browser_resources.h" | 11 #include "chrome/grit/browser_resources.h" |
12 #include "chrome/grit/theme_resources.h" | |
13 #include "content/public/browser/web_contents.h" | 12 #include "content/public/browser/web_contents.h" |
14 #include "content/public/browser/web_ui.h" | 13 #include "content/public/browser/web_ui.h" |
15 #include "content/public/browser/web_ui_data_source.h" | 14 #include "content/public/browser/web_ui_data_source.h" |
16 | 15 |
17 namespace { | 16 namespace { |
18 | 17 |
19 content::WebUIDataSource* CreateAboutPageHTMLSource() { | 18 content::WebUIDataSource* CreateAboutPageHTMLSource() { |
20 content::WebUIDataSource* source = | 19 content::WebUIDataSource* source = |
21 content::WebUIDataSource::Create(chrome::kChromeUIHelpFrameHost); | 20 content::WebUIDataSource::Create(chrome::kChromeUIHelpFrameHost); |
22 source->SetJsonPath("strings.js"); | 21 source->SetJsonPath("strings.js"); |
(...skipping 14 matching lines...) Expand all Loading... |
37 | 36 |
38 base::DictionaryValue localized_strings; | 37 base::DictionaryValue localized_strings; |
39 HelpHandler::GetLocalizedValues(&localized_strings); | 38 HelpHandler::GetLocalizedValues(&localized_strings); |
40 source->AddLocalizedStrings(localized_strings); | 39 source->AddLocalizedStrings(localized_strings); |
41 content::WebUIDataSource::Add(profile, source); | 40 content::WebUIDataSource::Add(profile, source); |
42 web_ui->AddMessageHandler(base::MakeUnique<HelpHandler>()); | 41 web_ui->AddMessageHandler(base::MakeUnique<HelpHandler>()); |
43 } | 42 } |
44 | 43 |
45 HelpUI::~HelpUI() { | 44 HelpUI::~HelpUI() { |
46 } | 45 } |
OLD | NEW |