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

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: Using WebUI now 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
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
21 // Localized strings.
22 html_source->AddLocalizedString("title",
23 IDS_NEW_TAB_CHROME_WELCOME_PAGE_TITLE);
24 html_source->AddLocalizedString("takeATour", IDS_FIRSTRUN_TAKE_TOUR);
25 html_source->AddLocalizedString("firstRunSignedIn", IDS_FIRSTRUN_SIGNED_IN);
26 html_source->AddLocalizedString("settings", IDS_FIRSTRUN_SETTINGS_LINK);
27
28 // Add required resources.
29 html_source->set_json_path("strings.js");
30 html_source->add_resource_path("about_welcome_android.css",
31 IDR_ABOUT_WELCOME_CSS);
32 html_source->add_resource_path("about_welcome_android.js",
33 IDR_ABOUT_WELCOME_JS);
34 html_source->set_default_resource(IDR_ABOUT_WELCOME_HTML);
35
36 Profile* profile = Profile::FromWebUI(web_ui);
37 ChromeURLDataManager::AddDataSource(profile, html_source);
38 }
39
40 WelcomeUI::~WelcomeUI() {
41 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698