OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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)); | |
290 localized_strings.SetString("web_store_title", | 284 localized_strings.SetString("web_store_title", |
291 l10n_util::GetStringUTF16(IDS_EXTENSION_WEB_STORE_TITLE)); | 285 l10n_util::GetStringUTF16(IDS_EXTENSION_WEB_STORE_TITLE)); |
292 localized_strings.SetString("web_store_url", | 286 localized_strings.SetString("web_store_url", |
293 GetUrlWithLang(GURL(Extension::ChromeStoreURL()))); | 287 GetUrlWithLang(GURL(Extension::ChromeStoreURL()))); |
294 | 288 |
295 // Don't initiate the sync related message passing with the page if the sync | 289 // Don't initiate the sync related message passing with the page if the sync |
296 // code is not present. | 290 // code is not present. |
297 if (profile_->GetProfileSyncService()) | 291 if (profile_->GetProfileSyncService()) |
298 localized_strings.SetString("syncispresent", "true"); | 292 localized_strings.SetString("syncispresent", "true"); |
299 else | 293 else |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 std::string css_string; | 479 std::string css_string; |
486 css_string = ReplaceStringPlaceholders(new_tab_theme_css, subst, NULL); | 480 css_string = ReplaceStringPlaceholders(new_tab_theme_css, subst, NULL); |
487 css_string = ReplaceStringPlaceholders(css_string, subst2, NULL); | 481 css_string = ReplaceStringPlaceholders(css_string, subst2, NULL); |
488 css_string = ReplaceStringPlaceholders(css_string, subst3, NULL); | 482 css_string = ReplaceStringPlaceholders(css_string, subst3, NULL); |
489 | 483 |
490 new_tab_css_ = new RefCountedBytes; | 484 new_tab_css_ = new RefCountedBytes; |
491 new_tab_css_->data.resize(css_string.size()); | 485 new_tab_css_->data.resize(css_string.size()); |
492 std::copy(css_string.begin(), css_string.end(), | 486 std::copy(css_string.begin(), css_string.end(), |
493 new_tab_css_->data.begin()); | 487 new_tab_css_->data.begin()); |
494 } | 488 } |
OLD | NEW |