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

Unified Diff: chrome/browser/ui/webui/chromeos/charger_replacement_ui.cc

Issue 107103004: Implement the spring charger replacement UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Point iFrame to production site. Created 7 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/chromeos/charger_replacement_ui.h ('k') | chrome/chrome_browser_chromeos.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « chrome/browser/ui/webui/chromeos/charger_replacement_ui.h ('k') | chrome/chrome_browser_chromeos.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698