Chromium Code Reviews| Index: chrome/browser/ui/webui/about_ui.cc |
| diff --git a/chrome/browser/ui/webui/about_ui.cc b/chrome/browser/ui/webui/about_ui.cc |
| index e4a207121b25bf5454da5cef012e04269b836d2d..02c0237e0ee8378c6ec7ede35ab0e7d0d1d029be 100644 |
| --- a/chrome/browser/ui/webui/about_ui.cc |
| +++ b/chrome/browser/ui/webui/about_ui.cc |
| @@ -111,6 +111,10 @@ const char kStatsJsPath[] = "stats.js"; |
| const char kStringsJsPath[] = "strings.js"; |
| const char kVersionJsPath[] = "version.js"; |
| +#if defined(OS_ANDROID) |
| +const char kWelcomeJsPath[] = "welcome.js"; |
| +#endif |
| + |
| // When you type about:memory, it actually loads this intermediate URL that |
| // redirects you to the final page. This avoids the problem where typing |
| // "about:memory" on the new tab page or any other page where a process |
| @@ -1011,6 +1015,14 @@ std::string AboutVersionStrings(DictionaryValue* localized_strings, |
| l10n_util::GetStringUTF16(IDS_ABOUT_VERSION_TITLE)); |
| chrome::VersionInfo version_info; |
| +#if defined(OS_ANDROID) |
| + localized_strings->SetString("application", |
| + l10n_util::GetStringUTF16(IDS_ABOUT_VERSION_APPLICATION)); |
| + localized_strings->SetString("app_label", AboutAndroidApp::GetAppLabel()); |
| + localized_strings->SetString("app_version", |
| + AboutAndroidApp::GetAppVersionName()); |
| +#endif |
| + |
| localized_strings->SetString("name", |
| l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); |
| localized_strings->SetString("version", version_info.Version()); |
| @@ -1324,6 +1336,27 @@ void AboutUIHTMLSource::StartDataRequest(const std::string& path, |
| } else if (host == chrome::kChromeUILinuxProxyConfigHost) { |
| response = AboutLinuxProxyConfig(); |
| #endif |
| +#if defined(OS_ANDROID) |
| + } else if (host == chrome::kChromeUIWelcomeHost) { |
|
Evan Stade
2012/08/03 17:58:01
don't add more stuff to this crufty file. Please m
|
| + if (path == kStringsJsPath) { |
| + DictionaryValue* localized_strings = new DictionaryValue(); |
| + localized_strings->SetString("title", |
| + l10n_util::GetStringUTF16(IDS_NEW_TAB_CHROME_WELCOME_PAGE_TITLE)); |
| + localized_strings->SetString("take_a_tour", |
| + l10n_util::GetStringUTF16(IDS_FIRSTRUN_TAKE_TOUR)); |
| + localized_strings->SetString("first_run_signed_in", |
| + l10n_util::GetStringUTF16(IDS_FIRSTRUN_SIGNED_IN)); |
| + localized_strings->SetString("settings", |
| + l10n_util::GetStringUTF16(IDS_FIRSTRUN_SETTINGS_LINK)); |
| + std::string json_js; |
| + jstemplate_builder::AppendJsonJS(localized_strings, &json_js); |
| + response = json_js; |
| + } else { |
| + int idr = (path == kWelcomeJsPath) ? IDR_WELCOME_JS : IDR_WELCOME_HTML; |
| + response = ResourceBundle::GetSharedInstance().GetRawDataResource( |
| + idr, ui::SCALE_FACTOR_NONE).as_string(); |
| + } |
| +#endif |
| } else if (host == chrome::kChromeUIMemoryHost) { |
| response = GetAboutMemoryRedirectResponse(profile()); |
| } else if (host == chrome::kChromeUIMemoryRedirectHost) { |