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

Side by Side Diff: chrome/browser/ui/webui/help/help_ui.cc

Issue 449623003: Integrate About page into Settings for Chrome OS settings in a window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 4 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) 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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698