| 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 "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
| 8 #include "chrome/browser/ui/webui/help/help_handler.h" | 8 #include "chrome/browser/ui/webui/help/help_handler.h" |
| 9 #include "chrome/common/url_constants.h" | 9 #include "chrome/common/url_constants.h" |
| 10 #include "content/public/browser/web_contents.h" | 10 #include "content/public/browser/web_contents.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 } | 29 } |
| 30 | 30 |
| 31 } // namespace | 31 } // namespace |
| 32 | 32 |
| 33 HelpUI::HelpUI(content::WebUI* web_ui) | 33 HelpUI::HelpUI(content::WebUI* web_ui) |
| 34 : WebUIController(web_ui) { | 34 : WebUIController(web_ui) { |
| 35 Profile* profile = Profile::FromWebUI(web_ui); | 35 Profile* profile = Profile::FromWebUI(web_ui); |
| 36 content::WebUIDataSource* source = CreateAboutPageHTMLSource(); | 36 content::WebUIDataSource* source = CreateAboutPageHTMLSource(); |
| 37 | 37 |
| 38 HelpHandler* handler = new HelpHandler(); | 38 HelpHandler* handler = new HelpHandler(); |
| 39 handler->GetLocalizedValues(source); | 39 base::DictionaryValue localized_strings; |
| 40 HelpHandler::GetLocalizedValues(&localized_strings); |
| 41 source->AddLocalizedStrings(localized_strings); |
| 40 content::WebUIDataSource::Add(profile, source); | 42 content::WebUIDataSource::Add(profile, source); |
| 41 web_ui->AddMessageHandler(handler); | 43 web_ui->AddMessageHandler(handler); |
| 42 } | 44 } |
| 43 | 45 |
| 44 HelpUI::~HelpUI() { | 46 HelpUI::~HelpUI() { |
| 45 } | 47 } |
| OLD | NEW |