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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
473 load_time_data.SetBoolean("isSwipeTrackingFromScrollEventsEnabled", | 473 load_time_data.SetBoolean("isSwipeTrackingFromScrollEventsEnabled", |
474 is_swipe_tracking_from_scroll_events_enabled_); | 474 is_swipe_tracking_from_scroll_events_enabled_); |
475 | 475 |
476 load_time_data.SetBoolean("showApps", should_show_apps_page_); | 476 load_time_data.SetBoolean("showApps", should_show_apps_page_); |
477 load_time_data.SetBoolean("showWebStoreIcon", | 477 load_time_data.SetBoolean("showWebStoreIcon", |
478 !prefs->GetBoolean(prefs::kHideWebStoreIcon)); | 478 !prefs->GetBoolean(prefs::kHideWebStoreIcon)); |
479 | 479 |
480 bool bookmark_apps_enabled = extensions::util::IsNewBookmarkAppsEnabled(); | 480 bool bookmark_apps_enabled = extensions::util::IsNewBookmarkAppsEnabled(); |
481 load_time_data.SetBoolean("enableNewBookmarkApps", bookmark_apps_enabled); | 481 load_time_data.SetBoolean("enableNewBookmarkApps", bookmark_apps_enabled); |
482 | 482 |
483 bool hosted_apps_in_windows_enabled = | |
484 extensions::util::CanHostedAppsOpenInWindows(); | |
485 load_time_data.SetBoolean("hostedAppsInWindowsEnabled", | |
Dan Beam
2015/08/20 18:25:57
nit: hostedAppsInWindowsEnabled -> canHostedAppsOp
dominickn
2015/08/20 22:07:44
Done.
| |
486 hosted_apps_in_windows_enabled); | |
487 | |
483 load_time_data.SetBoolean("canShowAppInfoDialog", | 488 load_time_data.SetBoolean("canShowAppInfoDialog", |
484 CanShowAppInfoDialog()); | 489 CanShowAppInfoDialog()); |
485 | 490 |
486 #if defined(OS_CHROMEOS) | 491 #if defined(OS_CHROMEOS) |
487 load_time_data.SetString("expandMenu", | 492 load_time_data.SetString("expandMenu", |
488 l10n_util::GetStringUTF16(IDS_NEW_TAB_CLOSE_MENU_EXPAND)); | 493 l10n_util::GetStringUTF16(IDS_NEW_TAB_CLOSE_MENU_EXPAND)); |
489 #endif | 494 #endif |
490 | 495 |
491 NewTabPageHandler::GetLocalizedValues(profile_, &load_time_data); | 496 NewTabPageHandler::GetLocalizedValues(profile_, &load_time_data); |
492 AppLauncherLoginHandler::GetLocalizedValues(profile_, &load_time_data); | 497 AppLauncherLoginHandler::GetLocalizedValues(profile_, &load_time_data); |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
653 // Get our template. | 658 // Get our template. |
654 static const base::StringPiece new_tab_theme_css( | 659 static const base::StringPiece new_tab_theme_css( |
655 ResourceBundle::GetSharedInstance().GetRawDataResource( | 660 ResourceBundle::GetSharedInstance().GetRawDataResource( |
656 IDR_NEW_TAB_4_THEME_CSS)); | 661 IDR_NEW_TAB_4_THEME_CSS)); |
657 | 662 |
658 // Create the string from our template and the replacements. | 663 // Create the string from our template and the replacements. |
659 std::string css_string = | 664 std::string css_string = |
660 ui::ReplaceTemplateExpressions(new_tab_theme_css, substitutions); | 665 ui::ReplaceTemplateExpressions(new_tab_theme_css, substitutions); |
661 new_tab_css_ = base::RefCountedString::TakeString(&css_string); | 666 new_tab_css_ = base::RefCountedString::TakeString(&css_string); |
662 } | 667 } |
OLD | NEW |