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

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

Issue 16191003: Add enable-app-shims to chrome://flags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update comment in apps_page.js Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/resources/ntp4/apps_page.js ('k') | chrome/common/chrome_switches.h » ('j') | 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 "apps/app_launcher.h" 10 #include "apps/app_launcher.h"
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 l10n_util::GetStringUTF16(IDS_NEW_TAB_PAGE_APPS_PROMO_TITLE)); 437 l10n_util::GetStringUTF16(IDS_NEW_TAB_PAGE_APPS_PROMO_TITLE));
438 // On Mac OS X 10.7+, horizontal scrolling can be treated as a back or 438 // On Mac OS X 10.7+, horizontal scrolling can be treated as a back or
439 // forward gesture. Pass through a flag that indicates whether or not that 439 // forward gesture. Pass through a flag that indicates whether or not that
440 // feature is enabled. 440 // feature is enabled.
441 load_time_data.SetBoolean("isSwipeTrackingFromScrollEventsEnabled", 441 load_time_data.SetBoolean("isSwipeTrackingFromScrollEventsEnabled",
442 is_swipe_tracking_from_scroll_events_enabled_); 442 is_swipe_tracking_from_scroll_events_enabled_);
443 load_time_data.SetBoolean("showApps", should_show_apps_page_); 443 load_time_data.SetBoolean("showApps", should_show_apps_page_);
444 load_time_data.SetBoolean("showWebStoreIcon", 444 load_time_data.SetBoolean("showWebStoreIcon",
445 !prefs->GetBoolean(prefs::kHideWebStoreIcon)); 445 !prefs->GetBoolean(prefs::kHideWebStoreIcon));
446 446
447 #if defined(OS_MACOSX)
448 load_time_data.SetBoolean(
449 "disableCreateAppShortcut",
450 !CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableAppShims));
451 #endif
452
447 #if defined(OS_CHROMEOS) 453 #if defined(OS_CHROMEOS)
448 load_time_data.SetString("expandMenu", 454 load_time_data.SetString("expandMenu",
449 l10n_util::GetStringUTF16(IDS_NEW_TAB_CLOSE_MENU_EXPAND)); 455 l10n_util::GetStringUTF16(IDS_NEW_TAB_CLOSE_MENU_EXPAND));
450 #endif 456 #endif
451 457
452 NewTabPageHandler::GetLocalizedValues(profile_, &load_time_data); 458 NewTabPageHandler::GetLocalizedValues(profile_, &load_time_data);
453 NTPLoginHandler::GetLocalizedValues(profile_, &load_time_data); 459 NTPLoginHandler::GetLocalizedValues(profile_, &load_time_data);
454 460
455 webui::SetFontAndTextDirection(&load_time_data); 461 webui::SetFontAndTextDirection(&load_time_data);
456 462
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 // Get our template. 628 // Get our template.
623 static const base::StringPiece new_tab_theme_css( 629 static const base::StringPiece new_tab_theme_css(
624 ResourceBundle::GetSharedInstance().GetRawDataResource( 630 ResourceBundle::GetSharedInstance().GetRawDataResource(
625 IDR_NEW_TAB_4_THEME_CSS)); 631 IDR_NEW_TAB_4_THEME_CSS));
626 632
627 // Create the string from our template and the replacements. 633 // Create the string from our template and the replacements.
628 std::string css_string; 634 std::string css_string;
629 css_string = ReplaceStringPlaceholders(new_tab_theme_css, subst, NULL); 635 css_string = ReplaceStringPlaceholders(new_tab_theme_css, subst, NULL);
630 new_tab_css_ = base::RefCountedString::TakeString(&css_string); 636 new_tab_css_ = base::RefCountedString::TakeString(&css_string);
631 } 637 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/ntp4/apps_page.js ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698