| Index: chrome/browser/ui/webui/chromeos/charger_replacement_ui.cc
|
| diff --git a/chrome/browser/ui/webui/chromeos/charger_replacement_ui.cc b/chrome/browser/ui/webui/chromeos/charger_replacement_ui.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d377617b451348a6f81a8e8b052bda9bf90cd680
|
| --- /dev/null
|
| +++ b/chrome/browser/ui/webui/chromeos/charger_replacement_ui.cc
|
| @@ -0,0 +1,36 @@
|
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "chrome/browser/ui/webui/chromeos/charger_replacement_ui.h"
|
| +
|
| +#include "base/values.h"
|
| +#include "chrome/browser/profiles/profile.h"
|
| +#include "chrome/browser/ui/webui/chromeos/charger_replacement_handler.h"
|
| +#include "chrome/common/url_constants.h"
|
| +#include "content/public/browser/web_ui.h"
|
| +#include "content/public/browser/web_ui_data_source.h"
|
| +#include "grit/browser_resources.h"
|
| +
|
| +namespace chromeos {
|
| +
|
| +ChargerReplacementUI::ChargerReplacementUI(content::WebUI* web_ui)
|
| + : WebDialogUI(web_ui) {
|
| + DictionaryValue localized_strings;
|
| + ChargerReplacementHandler::GetLocalizedValues(&localized_strings);
|
| + content::WebUIDataSource* source = content::WebUIDataSource::Create(
|
| + chrome::kChromeUIChargerReplacementHost);
|
| + source->SetUseJsonJSFormatV2();
|
| + source->AddLocalizedStrings(localized_strings);
|
| + source->SetJsonPath("strings.js");
|
| + source->SetDefaultResource(IDR_CHARGER_REPLACEMENT_HTML);
|
| + source->DisableContentSecurityPolicy();
|
| +
|
| + Profile* profile = Profile::FromWebUI(web_ui);
|
| + content::WebUIDataSource::Add(profile, source);
|
| +}
|
| +
|
| +ChargerReplacementUI::~ChargerReplacementUI() {
|
| +}
|
| +
|
| +} // namespace chromeos
|
|
|