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 16 matching lines...) Expand all Loading... |
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("firstRunSignedIn", IDS_FIRSTRUN_SIGNED_IN); |
34 html_source->AddLocalizedString("settings", IDS_FIRSTRUN_SETTINGS_LINK); | 34 html_source->AddLocalizedString("settings", IDS_FIRSTRUN_SETTINGS_LINK); |
35 | 35 |
36 std::string locale = g_browser_process->GetApplicationLocale(); | 36 std::string locale = g_browser_process->GetApplicationLocale(); |
37 std::string product_tour_url = StringPrintf( | 37 std::string product_tour_url = base::StringPrintf( |
38 kProductTourBaseURL, locale.c_str()); | 38 kProductTourBaseURL, locale.c_str()); |
39 html_source->AddString("productTourUrl", product_tour_url); | 39 html_source->AddString("productTourUrl", product_tour_url); |
40 | 40 |
41 // Add required resources. | 41 // Add required resources. |
42 html_source->SetJsonPath("strings.js"); | 42 html_source->SetJsonPath("strings.js"); |
43 html_source->AddResourcePath("about_welcome_android.css", | 43 html_source->AddResourcePath("about_welcome_android.css", |
44 IDR_ABOUT_WELCOME_CSS); | 44 IDR_ABOUT_WELCOME_CSS); |
45 html_source->AddResourcePath("about_welcome_android.js", | 45 html_source->AddResourcePath("about_welcome_android.js", |
46 IDR_ABOUT_WELCOME_JS); | 46 IDR_ABOUT_WELCOME_JS); |
47 html_source->SetDefaultResource(IDR_ABOUT_WELCOME_HTML); | 47 html_source->SetDefaultResource(IDR_ABOUT_WELCOME_HTML); |
48 | 48 |
49 Profile* profile = Profile::FromWebUI(web_ui); | 49 Profile* profile = Profile::FromWebUI(web_ui); |
50 content::WebUIDataSource::Add(profile, html_source); | 50 content::WebUIDataSource::Add(profile, html_source); |
51 } | 51 } |
52 | 52 |
53 WelcomeUI::~WelcomeUI() { | 53 WelcomeUI::~WelcomeUI() { |
54 } | 54 } |
OLD | NEW |