Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/browser/ui/webui/md_settings_ui.h" | |
| 6 | |
| 7 #include <string> | |
| 8 | |
| 9 #include "base/values.h" | |
| 10 #include "chrome/common/url_constants.h" | |
| 11 #include "chrome/grit/generated_resources.h" | |
| 12 #include "content/public/browser/web_contents.h" | |
| 13 #include "content/public/browser/web_ui.h" | |
| 14 #include "content/public/browser/web_ui_data_source.h" | |
| 15 #include "grit/browser_resources.h" | |
| 16 | |
| 17 MdSettingsUI::MdSettingsUI(content::WebUI* web_ui) | |
| 18 : content::WebUIController(web_ui) { | |
| 19 content::WebUIDataSource* html_source = | |
| 20 content::WebUIDataSource::Create(chrome::kChromeUIMdSettingsHost); | |
| 21 // html_source->SetUseJsonJSFormatV2(); | |
|
stevenjb
2015/02/04 02:19:15
elim or comment
Oren Blasberg
2015/02/04 18:31:51
Done.
| |
| 22 | |
| 23 html_source->SetDefaultResource(IDR_MD_SETTINGS_UI_HTML); | |
| 24 | |
| 25 html_source->AddLocalizedString("settings_title", IDS_SETTINGS_TITLE); | |
| 26 | |
| 27 html_source->SetJsonPath("strings.js"); | |
| 28 | |
| 29 content::WebUIDataSource::Add(web_ui->GetWebContents()->GetBrowserContext(), | |
| 30 html_source); | |
| 31 } | |
| 32 | |
| 33 MdSettingsUI::~MdSettingsUI() { | |
| 34 } | |
| OLD | NEW |