| 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 <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 502 switches::kEnableStreamlinedHostedApps); | 502 switches::kEnableStreamlinedHostedApps); |
| 503 load_time_data.SetBoolean("enableStreamlinedHostedApps", | 503 load_time_data.SetBoolean("enableStreamlinedHostedApps", |
| 504 streamlined_hosted_apps); | 504 streamlined_hosted_apps); |
| 505 // Use a different string for launching as a regular tab for streamlined | 505 // Use a different string for launching as a regular tab for streamlined |
| 506 // hosted apps. | 506 // hosted apps. |
| 507 if (streamlined_hosted_apps) { | 507 if (streamlined_hosted_apps) { |
| 508 load_time_data.SetString("applaunchtypetab", | 508 load_time_data.SetString("applaunchtypetab", |
| 509 l10n_util::GetStringUTF16(IDS_APP_CONTEXT_MENU_OPEN_TAB)); | 509 l10n_util::GetStringUTF16(IDS_APP_CONTEXT_MENU_OPEN_TAB)); |
| 510 } | 510 } |
| 511 | 511 |
| 512 #if defined(OS_MACOSX) | |
| 513 load_time_data.SetBoolean( | |
| 514 "disableCreateAppShortcut", | |
| 515 CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableAppShims)); | |
| 516 #endif | |
| 517 | |
| 518 #if defined(OS_CHROMEOS) | 512 #if defined(OS_CHROMEOS) |
| 519 load_time_data.SetString("expandMenu", | 513 load_time_data.SetString("expandMenu", |
| 520 l10n_util::GetStringUTF16(IDS_NEW_TAB_CLOSE_MENU_EXPAND)); | 514 l10n_util::GetStringUTF16(IDS_NEW_TAB_CLOSE_MENU_EXPAND)); |
| 521 #endif | 515 #endif |
| 522 | 516 |
| 523 NewTabPageHandler::GetLocalizedValues(profile_, &load_time_data); | 517 NewTabPageHandler::GetLocalizedValues(profile_, &load_time_data); |
| 524 NTPLoginHandler::GetLocalizedValues(profile_, &load_time_data); | 518 NTPLoginHandler::GetLocalizedValues(profile_, &load_time_data); |
| 525 | 519 |
| 526 webui::SetFontAndTextDirection(&load_time_data); | 520 webui::SetFontAndTextDirection(&load_time_data); |
| 527 | 521 |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 726 // Get our template. | 720 // Get our template. |
| 727 static const base::StringPiece new_tab_theme_css( | 721 static const base::StringPiece new_tab_theme_css( |
| 728 ResourceBundle::GetSharedInstance().GetRawDataResource( | 722 ResourceBundle::GetSharedInstance().GetRawDataResource( |
| 729 IDR_NEW_TAB_4_THEME_CSS)); | 723 IDR_NEW_TAB_4_THEME_CSS)); |
| 730 | 724 |
| 731 // Create the string from our template and the replacements. | 725 // Create the string from our template and the replacements. |
| 732 std::string css_string; | 726 std::string css_string; |
| 733 css_string = ReplaceStringPlaceholders(new_tab_theme_css, subst, NULL); | 727 css_string = ReplaceStringPlaceholders(new_tab_theme_css, subst, NULL); |
| 734 new_tab_css_ = base::RefCountedString::TakeString(&css_string); | 728 new_tab_css_ = base::RefCountedString::TakeString(&css_string); |
| 735 } | 729 } |
| OLD | NEW |