OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/webui/welcome_ui_android.h" | 5 #include "chrome/browser/ui/webui/welcome_ui_android.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 : content::WebUIController(web_ui) { | 23 : content::WebUIController(web_ui) { |
24 // Set up the chrome://welcome source. | 24 // Set up the chrome://welcome source. |
25 content::WebUIDataSource* html_source = | 25 content::WebUIDataSource* html_source = |
26 content::WebUIDataSource::Create(chrome::kChromeUIWelcomeHost); | 26 content::WebUIDataSource::Create(chrome::kChromeUIWelcomeHost); |
27 html_source->SetUseJsonJSFormatV2(); | 27 html_source->SetUseJsonJSFormatV2(); |
28 | 28 |
29 // Localized strings. | 29 // Localized strings. |
30 html_source->AddLocalizedString("title", | 30 html_source->AddLocalizedString("title", |
31 IDS_NEW_TAB_CHROME_WELCOME_PAGE_TITLE); | 31 IDS_NEW_TAB_CHROME_WELCOME_PAGE_TITLE); |
32 html_source->AddLocalizedString("takeATour", IDS_FIRSTRUN_TAKE_TOUR); | 32 html_source->AddLocalizedString("takeATour", IDS_FIRSTRUN_TAKE_TOUR); |
33 html_source->AddLocalizedString("firstRunSignedIn", IDS_FIRSTRUN_SIGNED_IN); | 33 html_source->AddLocalizedString("firstRunSignedInTitle", |
| 34 IDS_FIRSTRUN_SIGNED_IN_TITLE); |
| 35 html_source->AddLocalizedString("firstRunSignedInDescription", |
| 36 IDS_FIRSTRUN_SIGNED_IN_DESCRIPTION); |
34 html_source->AddLocalizedString("settings", IDS_FIRSTRUN_SETTINGS_LINK); | 37 html_source->AddLocalizedString("settings", IDS_FIRSTRUN_SETTINGS_LINK); |
35 | 38 |
36 std::string locale = g_browser_process->GetApplicationLocale(); | 39 std::string locale = g_browser_process->GetApplicationLocale(); |
37 std::string product_tour_url = base::StringPrintf( | 40 std::string product_tour_url = base::StringPrintf( |
38 kProductTourBaseURL, locale.c_str()); | 41 kProductTourBaseURL, locale.c_str()); |
39 html_source->AddString("productTourUrl", product_tour_url); | 42 html_source->AddString("productTourUrl", product_tour_url); |
40 | 43 |
41 // Add required resources. | 44 // Add required resources. |
42 html_source->SetJsonPath("strings.js"); | 45 html_source->SetJsonPath("strings.js"); |
43 html_source->AddResourcePath("about_welcome_android.css", | 46 html_source->AddResourcePath("about_welcome_android.css", |
44 IDR_ABOUT_WELCOME_CSS); | 47 IDR_ABOUT_WELCOME_CSS); |
45 html_source->AddResourcePath("about_welcome_android.js", | 48 html_source->AddResourcePath("about_welcome_android.js", |
46 IDR_ABOUT_WELCOME_JS); | 49 IDR_ABOUT_WELCOME_JS); |
47 html_source->SetDefaultResource(IDR_ABOUT_WELCOME_HTML); | 50 html_source->SetDefaultResource(IDR_ABOUT_WELCOME_HTML); |
48 | 51 |
49 Profile* profile = Profile::FromWebUI(web_ui); | 52 Profile* profile = Profile::FromWebUI(web_ui); |
50 content::WebUIDataSource::Add(profile, html_source); | 53 content::WebUIDataSource::Add(profile, html_source); |
51 } | 54 } |
52 | 55 |
53 WelcomeUI::~WelcomeUI() { | 56 WelcomeUI::~WelcomeUI() { |
54 } | 57 } |
OLD | NEW |