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/ntp/ntp_resource_cache.h" | 5 #include "chrome/browser/ui/webui/ntp/ntp_resource_cache.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 localized_strings.SetString("otherSessionsEmpty", | 341 localized_strings.SetString("otherSessionsEmpty", |
342 l10n_util::GetStringUTF16(IDS_NEW_TAB_OTHER_SESSIONS_EMPTY)); | 342 l10n_util::GetStringUTF16(IDS_NEW_TAB_OTHER_SESSIONS_EMPTY)); |
343 localized_strings.SetString("webStoreLink", | 343 localized_strings.SetString("webStoreLink", |
344 GetUrlWithLang(GURL(extension_urls::GetWebstoreLaunchURL()))); | 344 GetUrlWithLang(GURL(extension_urls::GetWebstoreLaunchURL()))); |
345 localized_strings.SetBoolean("isWebStoreExperimentEnabled", | 345 localized_strings.SetBoolean("isWebStoreExperimentEnabled", |
346 NewTabUI::ShouldShowWebStoreFooterLink()); | 346 NewTabUI::ShouldShowWebStoreFooterLink()); |
347 localized_strings.SetBoolean("appInstallHintEnabled", | 347 localized_strings.SetBoolean("appInstallHintEnabled", |
348 NewTabUI::ShouldShowAppInstallHint()); | 348 NewTabUI::ShouldShowAppInstallHint()); |
349 localized_strings.SetBoolean("isSuggestionsPageEnabled", | 349 localized_strings.SetBoolean("isSuggestionsPageEnabled", |
350 NewTabUI::IsSuggestionsPageEnabled()); | 350 NewTabUI::IsSuggestionsPageEnabled()); |
| 351 localized_strings.SetBoolean("showAppsPage", NewTabUI::ShouldShowAppsPage()); |
351 | 352 |
352 #if defined(OS_CHROMEOS) | 353 #if defined(OS_CHROMEOS) |
353 localized_strings.SetString("expandMenu", | 354 localized_strings.SetString("expandMenu", |
354 l10n_util::GetStringUTF16(IDS_NEW_TAB_CLOSE_MENU_EXPAND)); | 355 l10n_util::GetStringUTF16(IDS_NEW_TAB_CLOSE_MENU_EXPAND)); |
355 #endif | 356 #endif |
356 | 357 |
357 NewTabPageHandler::GetLocalizedValues(profile_, &localized_strings); | 358 NewTabPageHandler::GetLocalizedValues(profile_, &localized_strings); |
358 NTPLoginHandler::GetLocalizedValues(profile_, &localized_strings); | 359 NTPLoginHandler::GetLocalizedValues(profile_, &localized_strings); |
359 | 360 |
360 // Don't initiate the sync related message passing with the page if the sync | 361 // Don't initiate the sync related message passing with the page if the sync |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 // Get our template. | 531 // Get our template. |
531 static const base::StringPiece new_tab_theme_css( | 532 static const base::StringPiece new_tab_theme_css( |
532 ResourceBundle::GetSharedInstance().GetRawDataResource( | 533 ResourceBundle::GetSharedInstance().GetRawDataResource( |
533 IDR_NEW_TAB_4_THEME_CSS)); | 534 IDR_NEW_TAB_4_THEME_CSS)); |
534 | 535 |
535 // Create the string from our template and the replacements. | 536 // Create the string from our template and the replacements. |
536 std::string css_string; | 537 std::string css_string; |
537 css_string = ReplaceStringPlaceholders(new_tab_theme_css, subst, NULL); | 538 css_string = ReplaceStringPlaceholders(new_tab_theme_css, subst, NULL); |
538 new_tab_css_ = base::RefCountedString::TakeString(&css_string); | 539 new_tab_css_ = base::RefCountedString::TakeString(&css_string); |
539 } | 540 } |
OLD | NEW |