| 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 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 l10n_util::GetStringUTF16(IDS_NEW_TAB_PAGE_SWITCHER_CHANGE_TITLE)); | 478 l10n_util::GetStringUTF16(IDS_NEW_TAB_PAGE_SWITCHER_CHANGE_TITLE)); |
| 479 load_time_data.SetString("page_switcher_same_title", | 479 load_time_data.SetString("page_switcher_same_title", |
| 480 l10n_util::GetStringUTF16(IDS_NEW_TAB_PAGE_SWITCHER_SAME_TITLE)); | 480 l10n_util::GetStringUTF16(IDS_NEW_TAB_PAGE_SWITCHER_SAME_TITLE)); |
| 481 load_time_data.SetString("appsPromoTitle", | 481 load_time_data.SetString("appsPromoTitle", |
| 482 l10n_util::GetStringUTF16(IDS_NEW_TAB_PAGE_APPS_PROMO_TITLE)); | 482 l10n_util::GetStringUTF16(IDS_NEW_TAB_PAGE_APPS_PROMO_TITLE)); |
| 483 // On Mac OS X 10.7+, horizontal scrolling can be treated as a back or | 483 // On Mac OS X 10.7+, horizontal scrolling can be treated as a back or |
| 484 // forward gesture. Pass through a flag that indicates whether or not that | 484 // forward gesture. Pass through a flag that indicates whether or not that |
| 485 // feature is enabled. | 485 // feature is enabled. |
| 486 load_time_data.SetBoolean("isSwipeTrackingFromScrollEventsEnabled", | 486 load_time_data.SetBoolean("isSwipeTrackingFromScrollEventsEnabled", |
| 487 is_swipe_tracking_from_scroll_events_enabled_); | 487 is_swipe_tracking_from_scroll_events_enabled_); |
| 488 // Managed users can not have apps installed currently so there's no need to | 488 // Supervised users can not have apps installed currently so there's no need |
| 489 // show the app cards. | 489 // to show the app cards. |
| 490 if (profile_->IsManaged()) | 490 if (profile_->IsSupervised()) |
| 491 should_show_apps_page_ = false; | 491 should_show_apps_page_ = false; |
| 492 | 492 |
| 493 load_time_data.SetBoolean("showApps", should_show_apps_page_); | 493 load_time_data.SetBoolean("showApps", should_show_apps_page_); |
| 494 load_time_data.SetBoolean("showWebStoreIcon", | 494 load_time_data.SetBoolean("showWebStoreIcon", |
| 495 !prefs->GetBoolean(prefs::kHideWebStoreIcon)); | 495 !prefs->GetBoolean(prefs::kHideWebStoreIcon)); |
| 496 | 496 |
| 497 bool streamlined_hosted_apps = CommandLine::ForCurrentProcess()->HasSwitch( | 497 bool streamlined_hosted_apps = CommandLine::ForCurrentProcess()->HasSwitch( |
| 498 switches::kEnableStreamlinedHostedApps); | 498 switches::kEnableStreamlinedHostedApps); |
| 499 load_time_data.SetBoolean("enableStreamlinedHostedApps", | 499 load_time_data.SetBoolean("enableStreamlinedHostedApps", |
| 500 streamlined_hosted_apps); | 500 streamlined_hosted_apps); |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 716 // Get our template. | 716 // Get our template. |
| 717 static const base::StringPiece new_tab_theme_css( | 717 static const base::StringPiece new_tab_theme_css( |
| 718 ResourceBundle::GetSharedInstance().GetRawDataResource( | 718 ResourceBundle::GetSharedInstance().GetRawDataResource( |
| 719 IDR_NEW_TAB_4_THEME_CSS)); | 719 IDR_NEW_TAB_4_THEME_CSS)); |
| 720 | 720 |
| 721 // Create the string from our template and the replacements. | 721 // Create the string from our template and the replacements. |
| 722 std::string css_string; | 722 std::string css_string; |
| 723 css_string = ReplaceStringPlaceholders(new_tab_theme_css, subst, NULL); | 723 css_string = ReplaceStringPlaceholders(new_tab_theme_css, subst, NULL); |
| 724 new_tab_css_ = base::RefCountedString::TakeString(&css_string); | 724 new_tab_css_ = base::RefCountedString::TakeString(&css_string); |
| 725 } | 725 } |
| OLD | NEW |