| 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/policy_ui.h" | 5 #include "chrome/browser/ui/webui/policy_ui.h" |
| 6 | 6 |
| 7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
| 8 #include "chrome/browser/ui/webui/policy_ui_handler.h" | 8 #include "chrome/browser/ui/webui/policy_ui_handler.h" |
| 9 #include "chrome/common/url_constants.h" | 9 #include "chrome/common/url_constants.h" |
| 10 #include "chrome/grit/browser_resources.h" |
| 11 #include "components/strings/grit/components_strings.h" |
| 10 #include "content/public/browser/web_ui.h" | 12 #include "content/public/browser/web_ui.h" |
| 11 #include "grit/browser_resources.h" | |
| 12 #include "grit/components_strings.h" | |
| 13 | 13 |
| 14 namespace { | 14 namespace { |
| 15 | 15 |
| 16 content::WebUIDataSource* CreatePolicyUIHtmlSource() { | 16 content::WebUIDataSource* CreatePolicyUIHtmlSource() { |
| 17 content::WebUIDataSource* source = | 17 content::WebUIDataSource* source = |
| 18 content::WebUIDataSource::Create(chrome::kChromeUIPolicyHost); | 18 content::WebUIDataSource::Create(chrome::kChromeUIPolicyHost); |
| 19 PolicyUIHandler::AddCommonLocalizedStringsToSource(source); | 19 PolicyUIHandler::AddCommonLocalizedStringsToSource(source); |
| 20 source->AddLocalizedString("filterPlaceholder", | 20 source->AddLocalizedString("filterPlaceholder", |
| 21 IDS_POLICY_FILTER_PLACEHOLDER); | 21 IDS_POLICY_FILTER_PLACEHOLDER); |
| 22 source->AddLocalizedString("reloadPolicies", IDS_POLICY_RELOAD_POLICIES); | 22 source->AddLocalizedString("reloadPolicies", IDS_POLICY_RELOAD_POLICIES); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 52 } // namespace | 52 } // namespace |
| 53 | 53 |
| 54 PolicyUI::PolicyUI(content::WebUI* web_ui) : WebUIController(web_ui) { | 54 PolicyUI::PolicyUI(content::WebUI* web_ui) : WebUIController(web_ui) { |
| 55 web_ui->AddMessageHandler(new PolicyUIHandler); | 55 web_ui->AddMessageHandler(new PolicyUIHandler); |
| 56 content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), | 56 content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), |
| 57 CreatePolicyUIHtmlSource()); | 57 CreatePolicyUIHtmlSource()); |
| 58 } | 58 } |
| 59 | 59 |
| 60 PolicyUI::~PolicyUI() { | 60 PolicyUI::~PolicyUI() { |
| 61 } | 61 } |
| OLD | NEW |