| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/dom_ui/ntp_resource_cache.h" | 5 #include "chrome/browser/dom_ui/ntp_resource_cache.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "app/animation.h" | 10 #include "app/animation.h" |
| 11 #include "app/l10n_util.h" | 11 #include "app/l10n_util.h" |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 localized_strings.SetString("pagedisplaytooltip", | 261 localized_strings.SetString("pagedisplaytooltip", |
| 262 l10n_util::GetStringUTF16(IDS_NEW_TAB_PAGE_DISPLAY_TOOLTIP)); | 262 l10n_util::GetStringUTF16(IDS_NEW_TAB_PAGE_DISPLAY_TOOLTIP)); |
| 263 localized_strings.SetString("firstrunnotification", | 263 localized_strings.SetString("firstrunnotification", |
| 264 l10n_util::GetStringUTF16(IDS_NEW_TAB_FIRST_RUN_NOTIFICATION)); | 264 l10n_util::GetStringUTF16(IDS_NEW_TAB_FIRST_RUN_NOTIFICATION)); |
| 265 localized_strings.SetString("closefirstrunnotification", | 265 localized_strings.SetString("closefirstrunnotification", |
| 266 l10n_util::GetStringUTF16(IDS_NEW_TAB_CLOSE_FIRST_RUN_NOTIFICATION)); | 266 l10n_util::GetStringUTF16(IDS_NEW_TAB_CLOSE_FIRST_RUN_NOTIFICATION)); |
| 267 localized_strings.SetString("tips", | 267 localized_strings.SetString("tips", |
| 268 l10n_util::GetStringUTF16(IDS_NEW_TAB_TIPS)); | 268 l10n_util::GetStringUTF16(IDS_NEW_TAB_TIPS)); |
| 269 localized_strings.SetString("close", l10n_util::GetStringUTF16(IDS_CLOSE)); | 269 localized_strings.SetString("close", l10n_util::GetStringUTF16(IDS_CLOSE)); |
| 270 localized_strings.SetString("history", | 270 localized_strings.SetString("history", |
| 271 l10n_util::GetStringUTF16(IDS_NEW_TAB_HISTORY)); | 271 l10n_util::GetStringUTF16(IDS_NEW_TAB_HISTORY)); |
| 272 localized_strings.SetString("downloads", | 272 localized_strings.SetString("downloads", |
| 273 l10n_util::GetStringUTF16(IDS_NEW_TAB_DOWNLOADS)); | 273 l10n_util::GetStringUTF16(IDS_NEW_TAB_DOWNLOADS)); |
| 274 localized_strings.SetString("help", | 274 localized_strings.SetString("help", |
| 275 l10n_util::GetStringUTF16(IDS_NEW_TAB_HELP)); | 275 l10n_util::GetStringUTF16(IDS_NEW_TAB_HELP)); |
| 276 localized_strings.SetString("helpurl", | 276 localized_strings.SetString("helpurl", |
| 277 GetUrlWithLang(GURL(kHelpContentUrl))); | 277 GetUrlWithLang(GURL(kHelpContentUrl))); |
| 278 localized_strings.SetString("appsettings", | 278 localized_strings.SetString("appsettings", |
| 279 l10n_util::GetStringUTF16(IDS_NEW_TAB_APP_SETTINGS)); | 279 l10n_util::GetStringUTF16(IDS_NEW_TAB_APP_SETTINGS)); |
| 280 localized_strings.SetString("appuninstall", | 280 localized_strings.SetString("appuninstall", |
| 281 l10n_util::GetStringUTF16(IDS_NEW_TAB_APP_UNINSTALL)); | 281 l10n_util::GetStringUTF16(IDS_NEW_TAB_APP_UNINSTALL)); |
| 282 localized_strings.SetString("appoptions", | 282 localized_strings.SetString("appoptions", |
| 283 l10n_util::GetStringUTF16(IDS_NEW_TAB_APP_OPTIONS)); | 283 l10n_util::GetStringUTF16(IDS_NEW_TAB_APP_OPTIONS)); |
| 284 localized_strings.SetString("applaunchtypepinned", |
| 285 l10n_util::GetStringUTF16(IDS_APP_CONTEXT_MENU_OPEN_PINNED)); |
| 286 localized_strings.SetString("applaunchtyperegular", |
| 287 l10n_util::GetStringUTF16(IDS_APP_CONTEXT_MENU_OPEN_REGULAR)); |
| 288 localized_strings.SetString("applaunchtypefullscreen", |
| 289 l10n_util::GetStringUTF16(IDS_APP_CONTEXT_MENU_OPEN_FULLSCREEN)); |
| 284 localized_strings.SetString("web_store_title", | 290 localized_strings.SetString("web_store_title", |
| 285 l10n_util::GetStringUTF16(IDS_EXTENSION_WEB_STORE_TITLE)); | 291 l10n_util::GetStringUTF16(IDS_EXTENSION_WEB_STORE_TITLE)); |
| 286 localized_strings.SetString("web_store_url", | 292 localized_strings.SetString("web_store_url", |
| 287 GetUrlWithLang(GURL(Extension::ChromeStoreURL()))); | 293 GetUrlWithLang(GURL(Extension::ChromeStoreURL()))); |
| 288 | 294 |
| 289 // Don't initiate the sync related message passing with the page if the sync | 295 // Don't initiate the sync related message passing with the page if the sync |
| 290 // code is not present. | 296 // code is not present. |
| 291 if (profile_->GetProfileSyncService()) | 297 if (profile_->GetProfileSyncService()) |
| 292 localized_strings.SetString("syncispresent", "true"); | 298 localized_strings.SetString("syncispresent", "true"); |
| 293 else | 299 else |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 std::string css_string; | 485 std::string css_string; |
| 480 css_string = ReplaceStringPlaceholders(new_tab_theme_css, subst, NULL); | 486 css_string = ReplaceStringPlaceholders(new_tab_theme_css, subst, NULL); |
| 481 css_string = ReplaceStringPlaceholders(css_string, subst2, NULL); | 487 css_string = ReplaceStringPlaceholders(css_string, subst2, NULL); |
| 482 css_string = ReplaceStringPlaceholders(css_string, subst3, NULL); | 488 css_string = ReplaceStringPlaceholders(css_string, subst3, NULL); |
| 483 | 489 |
| 484 new_tab_css_ = new RefCountedBytes; | 490 new_tab_css_ = new RefCountedBytes; |
| 485 new_tab_css_->data.resize(css_string.size()); | 491 new_tab_css_->data.resize(css_string.size()); |
| 486 std::copy(css_string.begin(), css_string.end(), | 492 std::copy(css_string.begin(), css_string.end(), |
| 487 new_tab_css_->data.begin()); | 493 new_tab_css_->data.begin()); |
| 488 } | 494 } |
| OLD | NEW |