Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: chrome/browser/ui/webui/ntp/ntp_resource_cache.cc

Issue 1305653002: Make the NTP apps page respect the enable hosted apps in windows flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@add-enable-hosted-apps-in-windows
Patch Set: Addressing reviewer feedback Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/resources/ntp4/apps_page.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 // On Mac OS X 10.7+, horizontal scrolling can be treated as a back or 470 // On Mac OS X 10.7+, horizontal scrolling can be treated as a back or
471 // forward gesture. Pass through a flag that indicates whether or not that 471 // forward gesture. Pass through a flag that indicates whether or not that
472 // feature is enabled. 472 // feature is enabled.
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 load_time_data.SetBoolean("enableNewBookmarkApps",
481 load_time_data.SetBoolean("enableNewBookmarkApps", bookmark_apps_enabled); 481 extensions::util::IsNewBookmarkAppsEnabled());
482
483 load_time_data.SetBoolean("canHostedAppsOpenInWindows",
484 extensions::util::CanHostedAppsOpenInWindows());
482 485
483 load_time_data.SetBoolean("canShowAppInfoDialog", 486 load_time_data.SetBoolean("canShowAppInfoDialog",
484 CanShowAppInfoDialog()); 487 CanShowAppInfoDialog());
485 488
486 #if defined(OS_CHROMEOS) 489 #if defined(OS_CHROMEOS)
487 load_time_data.SetString("expandMenu", 490 load_time_data.SetString("expandMenu",
488 l10n_util::GetStringUTF16(IDS_NEW_TAB_CLOSE_MENU_EXPAND)); 491 l10n_util::GetStringUTF16(IDS_NEW_TAB_CLOSE_MENU_EXPAND));
489 #endif 492 #endif
490 493
491 NewTabPageHandler::GetLocalizedValues(profile_, &load_time_data); 494 NewTabPageHandler::GetLocalizedValues(profile_, &load_time_data);
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 // Get our template. 656 // Get our template.
654 static const base::StringPiece new_tab_theme_css( 657 static const base::StringPiece new_tab_theme_css(
655 ResourceBundle::GetSharedInstance().GetRawDataResource( 658 ResourceBundle::GetSharedInstance().GetRawDataResource(
656 IDR_NEW_TAB_4_THEME_CSS)); 659 IDR_NEW_TAB_4_THEME_CSS));
657 660
658 // Create the string from our template and the replacements. 661 // Create the string from our template and the replacements.
659 std::string css_string = 662 std::string css_string =
660 ui::ReplaceTemplateExpressions(new_tab_theme_css, substitutions); 663 ui::ReplaceTemplateExpressions(new_tab_theme_css, substitutions);
661 new_tab_css_ = base::RefCountedString::TakeString(&css_string); 664 new_tab_css_ = base::RefCountedString::TakeString(&css_string);
662 } 665 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/ntp4/apps_page.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698