| OLD | NEW | 
|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/ntp_resource_cache.h" | 5 #include "chrome/browser/ui/webui/ntp_resource_cache.h" | 
| 6 | 6 | 
| 7 #include <algorithm> | 7 #include <algorithm> | 
| 8 #include <vector> | 8 #include <vector> | 
| 9 | 9 | 
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" | 
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 294   localized_strings.SetString("pinthumbnailtooltip", | 294   localized_strings.SetString("pinthumbnailtooltip", | 
| 295       l10n_util::GetStringUTF16(IDS_NEW_TAB_PIN_THUMBNAIL_TOOLTIP)); | 295       l10n_util::GetStringUTF16(IDS_NEW_TAB_PIN_THUMBNAIL_TOOLTIP)); | 
| 296   localized_strings.SetString("unpinthumbnailtooltip", | 296   localized_strings.SetString("unpinthumbnailtooltip", | 
| 297       l10n_util::GetStringUTF16(IDS_NEW_TAB_UNPIN_THUMBNAIL_TOOLTIP)); | 297       l10n_util::GetStringUTF16(IDS_NEW_TAB_UNPIN_THUMBNAIL_TOOLTIP)); | 
| 298   localized_strings.SetString("showhidethumbnailtooltip", | 298   localized_strings.SetString("showhidethumbnailtooltip", | 
| 299       l10n_util::GetStringUTF16(IDS_NEW_TAB_SHOW_HIDE_THUMBNAIL_TOOLTIP)); | 299       l10n_util::GetStringUTF16(IDS_NEW_TAB_SHOW_HIDE_THUMBNAIL_TOOLTIP)); | 
| 300   localized_strings.SetString("showhidelisttooltip", | 300   localized_strings.SetString("showhidelisttooltip", | 
| 301       l10n_util::GetStringUTF16(IDS_NEW_TAB_SHOW_HIDE_LIST_TOOLTIP)); | 301       l10n_util::GetStringUTF16(IDS_NEW_TAB_SHOW_HIDE_LIST_TOOLTIP)); | 
| 302   localized_strings.SetString("pagedisplaytooltip", | 302   localized_strings.SetString("pagedisplaytooltip", | 
| 303       l10n_util::GetStringUTF16(IDS_NEW_TAB_PAGE_DISPLAY_TOOLTIP)); | 303       l10n_util::GetStringUTF16(IDS_NEW_TAB_PAGE_DISPLAY_TOOLTIP)); | 
| 304   localized_strings.SetString("firstrunnotification", |  | 
| 305       l10n_util::GetStringUTF16(IDS_NEW_TAB_FIRST_RUN_NOTIFICATION)); |  | 
| 306   localized_strings.SetString("closefirstrunnotification", | 304   localized_strings.SetString("closefirstrunnotification", | 
| 307       l10n_util::GetStringUTF16(IDS_NEW_TAB_CLOSE_FIRST_RUN_NOTIFICATION)); | 305       l10n_util::GetStringUTF16(IDS_NEW_TAB_CLOSE_FIRST_RUN_NOTIFICATION)); | 
| 308   localized_strings.SetString("close", l10n_util::GetStringUTF16(IDS_CLOSE)); | 306   localized_strings.SetString("close", l10n_util::GetStringUTF16(IDS_CLOSE)); | 
| 309   localized_strings.SetString("history", | 307   localized_strings.SetString("history", | 
| 310       l10n_util::GetStringUTF16(IDS_NEW_TAB_HISTORY)); | 308       l10n_util::GetStringUTF16(IDS_NEW_TAB_HISTORY)); | 
| 311   localized_strings.SetString("downloads", | 309   localized_strings.SetString("downloads", | 
| 312       l10n_util::GetStringUTF16(IDS_NEW_TAB_DOWNLOADS)); | 310       l10n_util::GetStringUTF16(IDS_NEW_TAB_DOWNLOADS)); | 
| 313   localized_strings.SetString("help", | 311   localized_strings.SetString("help", | 
| 314       l10n_util::GetStringUTF16(IDS_NEW_TAB_HELP)); | 312       l10n_util::GetStringUTF16(IDS_NEW_TAB_HELP)); | 
| 315   localized_strings.SetString("helpurl", | 313   localized_strings.SetString("helpurl", | 
| (...skipping 11 matching lines...) Expand all  Loading... | 
| 327   localized_strings.SetString("applaunchtyperegular", | 325   localized_strings.SetString("applaunchtyperegular", | 
| 328       l10n_util::GetStringUTF16(IDS_APP_CONTEXT_MENU_OPEN_REGULAR)); | 326       l10n_util::GetStringUTF16(IDS_APP_CONTEXT_MENU_OPEN_REGULAR)); | 
| 329   localized_strings.SetString("applaunchtypewindow", | 327   localized_strings.SetString("applaunchtypewindow", | 
| 330       l10n_util::GetStringUTF16(IDS_APP_CONTEXT_MENU_OPEN_WINDOW)); | 328       l10n_util::GetStringUTF16(IDS_APP_CONTEXT_MENU_OPEN_WINDOW)); | 
| 331   localized_strings.SetString("applaunchtypefullscreen", | 329   localized_strings.SetString("applaunchtypefullscreen", | 
| 332       l10n_util::GetStringUTF16(IDS_APP_CONTEXT_MENU_OPEN_FULLSCREEN)); | 330       l10n_util::GetStringUTF16(IDS_APP_CONTEXT_MENU_OPEN_FULLSCREEN)); | 
| 333   localized_strings.SetString("web_store_title", | 331   localized_strings.SetString("web_store_title", | 
| 334       l10n_util::GetStringUTF16(IDS_EXTENSION_WEB_STORE_TITLE)); | 332       l10n_util::GetStringUTF16(IDS_EXTENSION_WEB_STORE_TITLE)); | 
| 335   localized_strings.SetString("web_store_url", | 333   localized_strings.SetString("web_store_url", | 
| 336       GetUrlWithLang(GURL(Extension::ChromeStoreLaunchURL()))); | 334       GetUrlWithLang(GURL(Extension::ChromeStoreLaunchURL()))); | 
| 337   localized_strings.SetString("appspromohide", |  | 
| 338       l10n_util::GetStringUTF16(IDS_APPS_PROMO_HIDE)); |  | 
| 339   localized_strings.SetString("appspromoheader", |  | 
| 340       l10n_util::GetStringUTF16(IDS_APPS_PROMO_HEADER)); |  | 
| 341   localized_strings.SetString("appspromotext1", |  | 
| 342       l10n_util::GetStringUTF16(IDS_APPS_PROMO_TEXT_1)); |  | 
| 343   localized_strings.SetString("appspromotext2", |  | 
| 344       l10n_util::GetStringUTF16(IDS_APPS_PROMO_TEXT_2)); |  | 
| 345   localized_strings.SetString("syncpromotext", | 335   localized_strings.SetString("syncpromotext", | 
| 346       l10n_util::GetStringUTF16(IDS_SYNC_START_SYNC_BUTTON_LABEL)); | 336       l10n_util::GetStringUTF16(IDS_SYNC_START_SYNC_BUTTON_LABEL)); | 
| 347 #if defined(OS_CHROMEOS) | 337 #if defined(OS_CHROMEOS) | 
| 348   localized_strings.SetString("expandMenu", | 338   localized_strings.SetString("expandMenu", | 
| 349       l10n_util::GetStringUTF16(IDS_NEW_TAB_CLOSE_MENU_EXPAND)); | 339       l10n_util::GetStringUTF16(IDS_NEW_TAB_CLOSE_MENU_EXPAND)); | 
| 350 #endif | 340 #endif | 
| 351 | 341 | 
| 352   // Don't initiate the sync related message passing with the page if the sync | 342   // Don't initiate the sync related message passing with the page if the sync | 
| 353   // code is not present. | 343   // code is not present. | 
| 354   if (profile_->GetProfileSyncService()) | 344   if (profile_->GetProfileSyncService()) | 
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 570   std::string css_string; | 560   std::string css_string; | 
| 571   css_string = ReplaceStringPlaceholders(new_tab_theme_css, subst, NULL); | 561   css_string = ReplaceStringPlaceholders(new_tab_theme_css, subst, NULL); | 
| 572   css_string = ReplaceStringPlaceholders(css_string, subst2, NULL); | 562   css_string = ReplaceStringPlaceholders(css_string, subst2, NULL); | 
| 573   css_string = ReplaceStringPlaceholders(css_string, subst3, NULL); | 563   css_string = ReplaceStringPlaceholders(css_string, subst3, NULL); | 
| 574 | 564 | 
| 575   new_tab_css_ = new RefCountedBytes; | 565   new_tab_css_ = new RefCountedBytes; | 
| 576   new_tab_css_->data.resize(css_string.size()); | 566   new_tab_css_->data.resize(css_string.size()); | 
| 577   std::copy(css_string.begin(), css_string.end(), | 567   std::copy(css_string.begin(), css_string.end(), | 
| 578             new_tab_css_->data.begin()); | 568             new_tab_css_->data.begin()); | 
| 579 } | 569 } | 
| OLD | NEW | 
|---|