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

Unified Diff: chrome/browser/ui/webui/welcome_ui_android.cc

Issue 10828140: Upstream about:welcome page for Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/welcome_ui_android.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/welcome_ui_android.cc
diff --git a/chrome/browser/ui/webui/welcome_ui_android.cc b/chrome/browser/ui/webui/welcome_ui_android.cc
new file mode 100644
index 0000000000000000000000000000000000000000..c1c7d61e8d3e438e8de24e0b225ab5b075eb8f53
--- /dev/null
+++ b/chrome/browser/ui/webui/welcome_ui_android.cc
@@ -0,0 +1,42 @@
+// Copyright (c) 2012 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/welcome_ui_android.h"
+
+#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/ui/webui/chrome_web_ui_data_source.h"
+#include "chrome/common/url_constants.h"
+#include "grit/browser_resources.h"
+#include "grit/chromium_strings.h"
+#include "grit/generated_resources.h"
+#include "grit/google_chrome_strings.h"
+
+WelcomeUI::WelcomeUI(content::WebUI* web_ui)
+ : content::WebUIController(web_ui) {
+ // Set up the chrome://welcome source.
+ ChromeWebUIDataSource* html_source =
+ new ChromeWebUIDataSource(chrome::kChromeUIWelcomeHost);
+ html_source->set_use_json_js_format_v2();
+
+ // Localized strings.
+ html_source->AddLocalizedString("title",
+ IDS_NEW_TAB_CHROME_WELCOME_PAGE_TITLE);
+ html_source->AddLocalizedString("takeATour", IDS_FIRSTRUN_TAKE_TOUR);
+ html_source->AddLocalizedString("firstRunSignedIn", IDS_FIRSTRUN_SIGNED_IN);
+ html_source->AddLocalizedString("settings", IDS_FIRSTRUN_SETTINGS_LINK);
+
+ // Add required resources.
+ html_source->set_json_path("strings.js");
+ html_source->add_resource_path("about_welcome_android.css",
+ IDR_ABOUT_WELCOME_CSS);
+ html_source->add_resource_path("about_welcome_android.js",
+ IDR_ABOUT_WELCOME_JS);
+ html_source->set_default_resource(IDR_ABOUT_WELCOME_HTML);
+
+ Profile* profile = Profile::FromWebUI(web_ui);
+ ChromeURLDataManager::AddDataSource(profile, html_source);
+}
+
+WelcomeUI::~WelcomeUI() {
+}
« no previous file with comments | « chrome/browser/ui/webui/welcome_ui_android.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698