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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/webui/welcome_ui_android.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/ui/webui/welcome_ui_android.h"
6
7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/ui/webui/chrome_web_ui_data_source.h"
9 #include "chrome/common/url_constants.h"
10 #include "grit/browser_resources.h"
11 #include "grit/chromium_strings.h"
12 #include "grit/generated_resources.h"
13 #include "grit/google_chrome_strings.h"
14
15 WelcomeUI::WelcomeUI(content::WebUI* web_ui)
16 : content::WebUIController(web_ui) {
17 // Set up the chrome://welcome source.
18 ChromeWebUIDataSource* html_source =
19 new ChromeWebUIDataSource(chrome::kChromeUIWelcomeHost);
20 html_source->set_use_json_js_format_v2();
21
22 // Localized strings.
23 html_source->AddLocalizedString("title",
24 IDS_NEW_TAB_CHROME_WELCOME_PAGE_TITLE);
25 html_source->AddLocalizedString("takeATour", IDS_FIRSTRUN_TAKE_TOUR);
26 html_source->AddLocalizedString("firstRunSignedIn", IDS_FIRSTRUN_SIGNED_IN);
27 html_source->AddLocalizedString("settings", IDS_FIRSTRUN_SETTINGS_LINK);
28
29 // Add required resources.
30 html_source->set_json_path("strings.js");
31 html_source->add_resource_path("about_welcome_android.css",
32 IDR_ABOUT_WELCOME_CSS);
33 html_source->add_resource_path("about_welcome_android.js",
34 IDR_ABOUT_WELCOME_JS);
35 html_source->set_default_resource(IDR_ABOUT_WELCOME_HTML);
36
37 Profile* profile = Profile::FromWebUI(web_ui);
38 ChromeURLDataManager::AddDataSource(profile, html_source);
39 }
40
41 WelcomeUI::~WelcomeUI() {
42 }
OLDNEW
« 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