summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbenwells <benwells@chromium.org>2015-01-27 14:04:06 -0800
committerCommit bot <commit-bot@chromium.org>2015-01-27 22:05:16 +0000
commitc431c0aee04d6b2caa3112f9d5b8b8682e69aa91 (patch)
treec8973e2a9480b7d40b7ffb619dd2c54d19f51517
parent7d596101a72b10d31ff36a03fd8c63d2c42d1aaa (diff)
downloadchromium_src-c431c0aee04d6b2caa3112f9d5b8b8682e69aa91.zip
chromium_src-c431c0aee04d6b2caa3112f9d5b8b8682e69aa91.tar.gz
chromium_src-c431c0aee04d6b2caa3112f9d5b8b8682e69aa91.tar.bz2
Rename StreamlinedHostedApps to NewBookmarkApps in the code.
This feature is now known by the name 'bookmark apps'. BUG=441127 Review URL: https://codereview.chromium.org/883603002 Cr-Commit-Position: refs/heads/master@{#313370}
-rw-r--r--chrome/browser/extensions/api/management/chrome_management_api_delegate.cc4
-rw-r--r--chrome/browser/extensions/api/management/chrome_management_api_delegate.h2
-rw-r--r--chrome/browser/extensions/extension_util.cc2
-rw-r--r--chrome/browser/extensions/extension_util.h7
-rw-r--r--chrome/browser/extensions/launch_util.h2
-rw-r--r--chrome/browser/extensions/tab_helper.cc2
-rw-r--r--chrome/browser/resources/ntp4/apps_page.js14
-rw-r--r--chrome/browser/ui/app_list/app_context_menu.cc14
-rw-r--r--chrome/browser/ui/app_list/extension_app_item.cc6
-rw-r--r--chrome/browser/ui/app_list/extension_app_model_builder.cc2
-rw-r--r--chrome/browser/ui/ash/launcher/launcher_app_tab_helper.cc2
-rw-r--r--chrome/browser/ui/ash/launcher/launcher_context_menu.cc14
-rw-r--r--chrome/browser/ui/browser.cc4
-rw-r--r--chrome/browser/ui/browser_browsertest.cc3
-rw-r--r--chrome/browser/ui/browser_command_controller.cc4
-rw-r--r--chrome/browser/ui/browser_commands.cc4
-rw-r--r--chrome/browser/ui/startup/startup_browser_creator_browsertest.cc3
-rw-r--r--chrome/browser/ui/startup/startup_browser_creator_impl.cc4
-rw-r--r--chrome/browser/ui/toolbar/wrench_menu_model.cc2
-rw-r--r--chrome/browser/ui/views/apps/app_info_dialog/app_info_summary_panel.cc11
-rw-r--r--chrome/browser/ui/views/toolbar/toolbar_view.cc3
-rw-r--r--chrome/browser/ui/webui/ntp/ntp_resource_cache.cc12
-rw-r--r--chrome/renderer/web_apps.cc2
-rw-r--r--extensions/browser/api/management/management_api.cc2
-rw-r--r--extensions/browser/api/management/management_api_delegate.h4
25 files changed, 60 insertions, 69 deletions
diff --git a/chrome/browser/extensions/api/management/chrome_management_api_delegate.cc b/chrome/browser/extensions/api/management/chrome_management_api_delegate.cc
index 23a0df4..e465ba7 100644
--- a/chrome/browser/extensions/api/management/chrome_management_api_delegate.cc
+++ b/chrome/browser/extensions/api/management/chrome_management_api_delegate.cc
@@ -264,8 +264,8 @@ ChromeManagementAPIDelegate::GenerateAppForLinkFunctionDelegate(
return scoped_ptr<extensions::AppForLinkDelegate>(delegate);
}
-bool ChromeManagementAPIDelegate::IsStreamlinedHostedAppsEnabled() const {
- return extensions::util::IsStreamlinedHostedAppsEnabled();
+bool ChromeManagementAPIDelegate::IsNewBookmarkAppsEnabled() const {
+ return extensions::util::IsNewBookmarkAppsEnabled();
}
void ChromeManagementAPIDelegate::EnableExtension(
diff --git a/chrome/browser/extensions/api/management/chrome_management_api_delegate.h b/chrome/browser/extensions/api/management/chrome_management_api_delegate.h
index 9a6b17f..4d0f19e 100644
--- a/chrome/browser/extensions/api/management/chrome_management_api_delegate.h
+++ b/chrome/browser/extensions/api/management/chrome_management_api_delegate.h
@@ -44,7 +44,7 @@ class ChromeManagementAPIDelegate : public extensions::ManagementAPIDelegate {
content::BrowserContext* context,
const std::string& title,
const GURL& launch_url) const override;
- bool IsStreamlinedHostedAppsEnabled() const override;
+ bool IsNewBookmarkAppsEnabled() const override;
void EnableExtension(content::BrowserContext* context,
const std::string& extension_id) const override;
void DisableExtension(
diff --git a/chrome/browser/extensions/extension_util.cc b/chrome/browser/extensions/extension_util.cc
index 92d1115..b07ab1c 100644
--- a/chrome/browser/extensions/extension_util.cc
+++ b/chrome/browser/extensions/extension_util.cc
@@ -349,7 +349,7 @@ const gfx::ImageSkia& GetDefaultExtensionIcon() {
IDR_EXTENSION_DEFAULT_ICON);
}
-bool IsStreamlinedHostedAppsEnabled() {
+bool IsNewBookmarkAppsEnabled() {
return base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableNewBookmarkApps);
}
diff --git a/chrome/browser/extensions/extension_util.h b/chrome/browser/extensions/extension_util.h
index a05e07b..7240500 100644
--- a/chrome/browser/extensions/extension_util.h
+++ b/chrome/browser/extensions/extension_util.h
@@ -123,14 +123,11 @@ bool SiteHasIsolatedStorage(const GURL& extension_site_url,
const gfx::ImageSkia& GetDefaultExtensionIcon();
const gfx::ImageSkia& GetDefaultAppIcon();
-// Returns true if the experimental streamlined hosted apps feature is enabled.
-//
-// TODO(benwells): http://crbug.com/441127: Rename this to
-// IsNewBookmarkAppsEnabled.
+// Returns true if the bookmark apps feature is enabled.
//
// TODO(benwells): http://crbug.com/441128: Remove this entirely once the
// feature is stable.
-bool IsStreamlinedHostedAppsEnabled();
+bool IsNewBookmarkAppsEnabled();
} // namespace util
} // namespace extensions
diff --git a/chrome/browser/extensions/launch_util.h b/chrome/browser/extensions/launch_util.h
index 9b0b294..31c3bed 100644
--- a/chrome/browser/extensions/launch_util.h
+++ b/chrome/browser/extensions/launch_util.h
@@ -30,7 +30,7 @@ class ExtensionPrefs;
// Gets the launch type preference. If no preference is set, returns
// LAUNCH_TYPE_DEFAULT.
// Returns LAUNCH_TYPE_WINDOW if there's no preference and
-// 'streamlined hosted apps' are enabled.
+// bookmark apps are enabled.
LaunchType GetLaunchType(const ExtensionPrefs* prefs,
const Extension* extension);
diff --git a/chrome/browser/extensions/tab_helper.cc b/chrome/browser/extensions/tab_helper.cc
index 328e8c9..9f05f93 100644
--- a/chrome/browser/extensions/tab_helper.cc
+++ b/chrome/browser/extensions/tab_helper.cc
@@ -230,7 +230,7 @@ void TabHelper::DidNavigateMainFrame(
ExtensionRegistry* registry = ExtensionRegistry::Get(context);
const ExtensionSet& enabled_extensions = registry->enabled_extensions();
- if (util::IsStreamlinedHostedAppsEnabled()) {
+ if (util::IsNewBookmarkAppsEnabled()) {
Browser* browser = chrome::FindBrowserWithWebContents(web_contents());
if (browser && browser->is_app()) {
const Extension* extension = registry->GetExtensionById(
diff --git a/chrome/browser/resources/ntp4/apps_page.js b/chrome/browser/resources/ntp4/apps_page.js
index 6925e21..5420f19 100644
--- a/chrome/browser/resources/ntp4/apps_page.js
+++ b/chrome/browser/resources/ntp4/apps_page.js
@@ -49,12 +49,12 @@ cr.define('ntp', function() {
this.launch_.addEventListener('activate', this.onLaunch_.bind(this));
menu.appendChild(cr.ui.MenuItem.createSeparator());
- if (loadTimeData.getBoolean('enableStreamlinedHostedApps'))
+ if (loadTimeData.getBoolean('enableNewBookmarkApps'))
this.launchRegularTab_ = this.appendMenuItem_('applaunchtypetab');
else
this.launchRegularTab_ = this.appendMenuItem_('applaunchtyperegular');
this.launchPinnedTab_ = this.appendMenuItem_('applaunchtypepinned');
- if (loadTimeData.getBoolean('enableStreamlinedHostedApps') || !cr.isMac)
+ if (loadTimeData.getBoolean('enableNewBookmarkApps') || !cr.isMac)
this.launchNewWindow_ = this.appendMenuItem_('applaunchtypewindow');
this.launchFullscreen_ = this.appendMenuItem_('applaunchtypefullscreen');
@@ -135,9 +135,9 @@ cr.define('ntp', function() {
this.forAllLaunchTypes_(function(launchTypeButton, id) {
launchTypeButton.disabled = false;
launchTypeButton.checked = app.appData.launch_type == id;
- // Streamlined hosted apps should only show the "Open as tab" button.
+ // If bookmark apps are enabled, only show the "Open as tab" button.
launchTypeButton.hidden = app.appData.packagedApp ||
- (loadTimeData.getBoolean('enableStreamlinedHostedApps') &&
+ (loadTimeData.getBoolean('enableNewBookmarkApps') &&
launchTypeButton != launchTypeRegularTab);
});
@@ -168,9 +168,9 @@ cr.define('ntp', function() {
var pressed = e.currentTarget;
var app = this.app_;
var targetLaunchType = pressed;
- // Streamlined hosted apps can only toggle between open as window and open
- // as tab.
- if (loadTimeData.getBoolean('enableStreamlinedHostedApps')) {
+ // When bookmark apps are enabled, hosted apps can only toggle between
+ // open as window and open as tab.
+ if (loadTimeData.getBoolean('enableNewBookmarkApps')) {
targetLaunchType = this.launchRegularTab_.checked ?
this.launchNewWindow_ : this.launchRegularTab_;
}
diff --git a/chrome/browser/ui/app_list/app_context_menu.cc b/chrome/browser/ui/app_list/app_context_menu.cc
index a5da12e..8634f4c 100644
--- a/chrome/browser/ui/app_list/app_context_menu.cc
+++ b/chrome/browser/ui/app_list/app_context_menu.cc
@@ -115,9 +115,9 @@ ui::MenuModel* AppContextMenu::GetMenuModel() {
menu_model_->AddSeparator(ui::NORMAL_SEPARATOR);
if (!is_platform_app_) {
- // Streamlined hosted apps can only toggle between USE_LAUNCH_TYPE_WINDOW
- // and USE_LAUNCH_TYPE_REGULAR.
- if (extensions::util::IsStreamlinedHostedAppsEnabled()) {
+ // When bookmark apps are enabled, hosted apps can only toggle between
+ // USE_LAUNCH_TYPE_WINDOW and USE_LAUNCH_TYPE_REGULAR.
+ if (extensions::util::IsNewBookmarkAppsEnabled()) {
menu_model_->AddCheckItemWithStringId(
USE_LAUNCH_TYPE_REGULAR,
IDS_APP_CONTEXT_MENU_OPEN_TAB);
@@ -194,7 +194,7 @@ base::string16 AppContextMenu::GetLabelForCommandId(int command_id) const {
// If --enable-new-bookmark-apps is enabled, then only check if
// USE_LAUNCH_TYPE_REGULAR is checked, as USE_LAUNCH_TYPE_PINNED (i.e. open
// as pinned tab) and fullscreen-by-default windows do not exist.
- if (extensions::util::IsStreamlinedHostedAppsEnabled()) {
+ if (extensions::util::IsNewBookmarkAppsEnabled()) {
return IsCommandIdChecked(USE_LAUNCH_TYPE_REGULAR) ?
l10n_util::GetStringUTF16(IDS_APP_LIST_CONTEXT_MENU_NEW_TAB) :
l10n_util::GetStringUTF16(IDS_APP_LIST_CONTEXT_MENU_NEW_WINDOW);
@@ -270,9 +270,9 @@ void AppContextMenu::ExecuteCommand(int command_id, int event_flags) {
command_id < USE_LAUNCH_TYPE_COMMAND_END) {
extensions::LaunchType launch_type = static_cast<extensions::LaunchType>(
command_id - USE_LAUNCH_TYPE_COMMAND_START);
- // Streamlined hosted apps can only toggle between LAUNCH_TYPE_WINDOW and
- // LAUNCH_TYPE_REGULAR.
- if (extensions::util::IsStreamlinedHostedAppsEnabled()) {
+ // When bookmark apps are enabled, hosted apps can only toggle between
+ // LAUNCH_TYPE_WINDOW and LAUNCH_TYPE_REGULAR.
+ if (extensions::util::IsNewBookmarkAppsEnabled()) {
launch_type = (controller_->GetExtensionLaunchType(profile_, app_id_) ==
extensions::LAUNCH_TYPE_REGULAR) ?
extensions::LAUNCH_TYPE_WINDOW :
diff --git a/chrome/browser/ui/app_list/extension_app_item.cc b/chrome/browser/ui/app_list/extension_app_item.cc
index d92648d..cbdfc3c 100644
--- a/chrome/browser/ui/app_list/extension_app_item.cc
+++ b/chrome/browser/ui/app_list/extension_app_item.cc
@@ -157,10 +157,10 @@ bool ExtensionAppItem::NeedsOverlay() const {
: extensions::LAUNCH_TYPE_WINDOW;
// The overlay icon is disabled for hosted apps in windowed mode with
- // streamlined hosted apps.
+ // bookmark apps enabled.
return !is_platform_app_ && extension_id_ != extension_misc::kChromeAppId &&
- (!extensions::util::IsStreamlinedHostedAppsEnabled() ||
- launch_type != extensions::LAUNCH_TYPE_WINDOW);
+ (!extensions::util::IsNewBookmarkAppsEnabled() ||
+ launch_type != extensions::LAUNCH_TYPE_WINDOW);
}
void ExtensionAppItem::Reload() {
diff --git a/chrome/browser/ui/app_list/extension_app_model_builder.cc b/chrome/browser/ui/app_list/extension_app_model_builder.cc
index 68ed129..2bac8c7 100644
--- a/chrome/browser/ui/app_list/extension_app_model_builder.cc
+++ b/chrome/browser/ui/app_list/extension_app_model_builder.cc
@@ -79,7 +79,7 @@ void ExtensionAppModelBuilder::InitializePrefChangeRegistrars() {
base::Bind(&ExtensionAppModelBuilder::OnProfilePreferenceChanged,
base::Unretained(this)));
- if (!extensions::util::IsStreamlinedHostedAppsEnabled())
+ if (!extensions::util::IsNewBookmarkAppsEnabled())
return;
// TODO(calamity): analyze the performance impact of doing this every
diff --git a/chrome/browser/ui/ash/launcher/launcher_app_tab_helper.cc b/chrome/browser/ui/ash/launcher/launcher_app_tab_helper.cc
index 34471df..6277546 100644
--- a/chrome/browser/ui/ash/launcher/launcher_app_tab_helper.cc
+++ b/chrome/browser/ui/ash/launcher/launcher_app_tab_helper.cc
@@ -53,7 +53,7 @@ const extensions::Extension* GetExtensionForTab(Profile* profile,
// Bookmark app windows should match their launch url extension despite
// their web extents.
- if (extensions::util::IsStreamlinedHostedAppsEnabled()) {
+ if (extensions::util::IsNewBookmarkAppsEnabled()) {
for (extensions::ExtensionSet::const_iterator it = extensions.begin();
it != extensions.end(); ++it) {
if (it->get()->from_bookmark() &&
diff --git a/chrome/browser/ui/ash/launcher/launcher_context_menu.cc b/chrome/browser/ui/ash/launcher/launcher_context_menu.cc
index ad6d9ae..86e6273 100644
--- a/chrome/browser/ui/ash/launcher/launcher_context_menu.cc
+++ b/chrome/browser/ui/ash/launcher/launcher_context_menu.cc
@@ -106,10 +106,10 @@ void LauncherContextMenu::Init() {
if (!controller_->IsPlatformApp(item_.id) &&
item_.type != ash::TYPE_WINDOWED_APP) {
AddSeparator(ui::NORMAL_SEPARATOR);
- if (extensions::util::IsStreamlinedHostedAppsEnabled()) {
- // Streamlined hosted apps launch in a window by default. This menu
- // item is re-interpreted as a single, toggle-able option to launch
- // the hosted app as a tab.
+ if (extensions::util::IsNewBookmarkAppsEnabled()) {
+ // With bookmark apps enabled, hosted apps launch in a window by
+ // default. This menu item is re-interpreted as a single, toggle-able
+ // option to launch the hosted app as a tab.
AddCheckItemWithStringId(
LAUNCH_TYPE_REGULAR_TAB,
IDS_APP_CONTEXT_MENU_OPEN_TAB);
@@ -313,9 +313,9 @@ void LauncherContextMenu::ExecuteCommand(int command_id, int event_flags) {
case LAUNCH_TYPE_REGULAR_TAB: {
extensions::LaunchType launch_type =
extensions::LAUNCH_TYPE_REGULAR;
- // Streamlined hosted apps can only toggle between LAUNCH_WINDOW and
- // LAUNCH_REGULAR.
- if (extensions::util::IsStreamlinedHostedAppsEnabled()) {
+ // With bookmark apps enabled, hosted apps can only toggle between
+ // LAUNCH_WINDOW and LAUNCH_REGULAR.
+ if (extensions::util::IsNewBookmarkAppsEnabled()) {
launch_type = controller_->GetLaunchType(item_.id) ==
extensions::LAUNCH_TYPE_REGULAR
? extensions::LAUNCH_TYPE_WINDOW
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 76085e9..700e560 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -2345,8 +2345,8 @@ bool Browser::ShouldShowLocationBar() const {
}
bool Browser::ShouldUseWebAppFrame() const {
- // Only use the web app frame for apps in ash, and only if streamlined hosted
- // apps are enabled.
+ // Only use the web app frame for apps in ash, and only if bookmark apps are
+ // enabled.
if (!is_app() || host_desktop_type() != chrome::HOST_DESKTOP_TYPE_ASH ||
!IsWebAppFrameEnabled()) {
return false;
diff --git a/chrome/browser/ui/browser_browsertest.cc b/chrome/browser/ui/browser_browsertest.cc
index e88a96c..94ecf11 100644
--- a/chrome/browser/ui/browser_browsertest.cc
+++ b/chrome/browser/ui/browser_browsertest.cc
@@ -1318,8 +1318,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, AppIdSwitch) {
chrome::startup::IS_FIRST_RUN : chrome::startup::IS_NOT_FIRST_RUN;
StartupBrowserCreatorImpl launch(base::FilePath(), command_line, first_run);
- bool new_bookmark_apps_enabled =
- extensions::util::IsStreamlinedHostedAppsEnabled();
+ bool new_bookmark_apps_enabled = extensions::util::IsNewBookmarkAppsEnabled();
// If the new bookmark app flow is enabled, the app should open as an tab.
// Otherwise the app should open as an app window.
diff --git a/chrome/browser/ui/browser_command_controller.cc b/chrome/browser/ui/browser_command_controller.cc
index 49486f6..0b47a1a 100644
--- a/chrome/browser/ui/browser_command_controller.cc
+++ b/chrome/browser/ui/browser_command_controller.cc
@@ -978,8 +978,8 @@ void BrowserCommandController::InitCommandState() {
// Navigation commands
command_updater_.UpdateCommandEnabled(
IDC_HOME,
- normal_window || (extensions::util::IsStreamlinedHostedAppsEnabled() &&
- browser_->is_app()));
+ normal_window ||
+ (extensions::util::IsNewBookmarkAppsEnabled() && browser_->is_app()));
// Window management commands
command_updater_.UpdateCommandEnabled(IDC_SELECT_NEXT_TAB, normal_window);
diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc
index b3f36a6..5891242 100644
--- a/chrome/browser/ui/browser_commands.cc
+++ b/chrome/browser/ui/browser_commands.cc
@@ -442,8 +442,8 @@ void Home(Browser* browser, WindowOpenDisposition disposition) {
GURL url = browser->profile()->GetHomePage();
#if defined(ENABLE_EXTENSIONS)
- // Streamlined hosted apps should return to their launch page when the home
- // button is pressed.
+ // With bookmark apps enabled, hosted apps should return to their launch page
+ // when the home button is pressed.
if (browser->is_app()) {
const extensions::Extension* extension =
extensions::ExtensionRegistry::Get(browser->profile())
diff --git a/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc b/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc
index ea89f45..c96fce4 100644
--- a/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc
+++ b/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc
@@ -326,8 +326,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest, OpenAppShortcutNoPref) {
// If new bookmark apps are enabled, it should be a standard tabbed window,
// not an app window; otherwise the reverse should be true.
- bool new_bookmark_apps_enabled =
- extensions::util::IsStreamlinedHostedAppsEnabled();
+ bool new_bookmark_apps_enabled = extensions::util::IsNewBookmarkAppsEnabled();
EXPECT_EQ(!new_bookmark_apps_enabled, new_browser->is_app());
EXPECT_EQ(new_bookmark_apps_enabled, new_browser->is_type_tabbed());
}
diff --git a/chrome/browser/ui/startup/startup_browser_creator_impl.cc b/chrome/browser/ui/startup/startup_browser_creator_impl.cc
index 23510ff..c8a0f2d 100644
--- a/chrome/browser/ui/startup/startup_browser_creator_impl.cc
+++ b/chrome/browser/ui/startup/startup_browser_creator_impl.cc
@@ -199,9 +199,9 @@ bool GetAppLaunchContainer(
extensions::LaunchContainer launch_container = extensions::GetLaunchContainer(
extensions::ExtensionPrefs::Get(profile), extension);
- if (!extensions::util::IsStreamlinedHostedAppsEnabled() &&
+ if (!extensions::util::IsNewBookmarkAppsEnabled() &&
!extensions::HasPreferredLaunchContainer(
- extensions::ExtensionPrefs::Get(profile), extension)) {
+ extensions::ExtensionPrefs::Get(profile), extension)) {
launch_container = extensions::LAUNCH_CONTAINER_WINDOW;
}
diff --git a/chrome/browser/ui/toolbar/wrench_menu_model.cc b/chrome/browser/ui/toolbar/wrench_menu_model.cc
index 1aacc05..f8dbcf8 100644
--- a/chrome/browser/ui/toolbar/wrench_menu_model.cc
+++ b/chrome/browser/ui/toolbar/wrench_menu_model.cc
@@ -239,7 +239,7 @@ void ToolsMenuModel::Build(Browser* browser) {
show_create_shortcuts = false;
#endif
- if (extensions::util::IsStreamlinedHostedAppsEnabled()) {
+ if (extensions::util::IsNewBookmarkAppsEnabled()) {
AddItemWithStringId(IDC_CREATE_HOSTED_APP, IDS_CREATE_HOSTED_APP);
AddSeparator(ui::NORMAL_SEPARATOR);
} else if (show_create_shortcuts) {
diff --git a/chrome/browser/ui/views/apps/app_info_dialog/app_info_summary_panel.cc b/chrome/browser/ui/views/apps/app_info_dialog/app_info_summary_panel.cc
index e88693f..6189246 100644
--- a/chrome/browser/ui/views/apps/app_info_dialog/app_info_summary_panel.cc
+++ b/chrome/browser/ui/views/apps/app_info_dialog/app_info_summary_panel.cc
@@ -58,16 +58,14 @@ class LaunchOptionsComboboxModel : public ui::ComboboxModel {
};
LaunchOptionsComboboxModel::LaunchOptionsComboboxModel() {
- if (extensions::util::IsStreamlinedHostedAppsEnabled()) {
- // Streamlined hosted apps can only toggle between LAUNCH_TYPE_WINDOW and
- // LAUNCH_TYPE_REGULAR.
+ if (extensions::util::IsNewBookmarkAppsEnabled()) {
+ // When bookmark apps are enabled, hosted apps can only toggle between
+ // LAUNCH_TYPE_WINDOW and LAUNCH_TYPE_REGULAR.
// TODO(sashab): Use a checkbox for this choice instead of combobox.
launch_types_.push_back(extensions::LAUNCH_TYPE_REGULAR);
launch_type_messages_.push_back(
l10n_util::GetStringUTF16(IDS_APP_CONTEXT_MENU_OPEN_TAB));
- // Although LAUNCH_TYPE_WINDOW doesn't work on Mac, the streamlined hosted
- // apps flag isn't available on Mac, so we must be on a non-Mac OS.
launch_types_.push_back(extensions::LAUNCH_TYPE_WINDOW);
launch_type_messages_.push_back(
l10n_util::GetStringUTF16(IDS_APP_CONTEXT_MENU_OPEN_WINDOW));
@@ -81,7 +79,8 @@ LaunchOptionsComboboxModel::LaunchOptionsComboboxModel() {
l10n_util::GetStringUTF16(IDS_APP_CONTEXT_MENU_OPEN_PINNED));
#if defined(OS_MACOSX)
- // Mac does not support standalone web app browser windows or maximize.
+ // Mac does not support standalone web app browser windows or maximize
+ // unless the new bookmark apps system is enabled.
launch_types_.push_back(extensions::LAUNCH_TYPE_FULLSCREEN);
launch_type_messages_.push_back(
l10n_util::GetStringUTF16(IDS_APP_CONTEXT_MENU_OPEN_FULLSCREEN));
diff --git a/chrome/browser/ui/views/toolbar/toolbar_view.cc b/chrome/browser/ui/views/toolbar/toolbar_view.cc
index b847ae8..a375a0a 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -576,8 +576,7 @@ void ToolbarView::Layout() {
next_element_x = reload_->bounds().right();
if (show_home_button_.GetValue() ||
- (browser_->is_app() &&
- extensions::util::IsStreamlinedHostedAppsEnabled())) {
+ (browser_->is_app() && extensions::util::IsNewBookmarkAppsEnabled())) {
home_->SetVisible(true);
home_->SetBounds(next_element_x, child_y,
home_->GetPreferredSize().width(), child_height);
diff --git a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
index 105ac6b..082177c 100644
--- a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
+++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
@@ -497,13 +497,11 @@ void NTPResourceCache::CreateNewTabHTML() {
load_time_data.SetBoolean("showWebStoreIcon",
!prefs->GetBoolean(prefs::kHideWebStoreIcon));
- bool streamlined_hosted_apps =
- extensions::util::IsStreamlinedHostedAppsEnabled();
- load_time_data.SetBoolean("enableStreamlinedHostedApps",
- streamlined_hosted_apps);
- // Use a different string for launching as a regular tab for streamlined
- // hosted apps.
- if (streamlined_hosted_apps) {
+ bool bookmark_apps_enabled = extensions::util::IsNewBookmarkAppsEnabled();
+ load_time_data.SetBoolean("enableNewBookmarkApps", bookmark_apps_enabled);
+ // Use a different string for launching as a regular tab when bookmark apps
+ // are enabled.
+ if (bookmark_apps_enabled) {
load_time_data.SetString("applaunchtypetab",
l10n_util::GetStringUTF16(IDS_APP_CONTEXT_MENU_OPEN_TAB));
}
diff --git a/chrome/renderer/web_apps.cc b/chrome/renderer/web_apps.cc
index 7f38367..0d26dfa 100644
--- a/chrome/renderer/web_apps.cc
+++ b/chrome/renderer/web_apps.cc
@@ -143,7 +143,7 @@ void ParseWebAppFromWebDocument(WebFrame* frame,
// <http://en.wikipedia.org/wiki/Favicon>
// <http://dev.w3.org/html5/spec/Overview.html#rel-icon>
//
- // Streamlined Hosted Apps also support "apple-touch-icon" and
+ // Bookmark apps also support "apple-touch-icon" and
// "apple-touch-icon-precomposed".
if (LowerCaseEqualsASCII(rel, "icon") ||
LowerCaseEqualsASCII(rel, "shortcut icon") ||
diff --git a/extensions/browser/api/management/management_api.cc b/extensions/browser/api/management/management_api.cc
index 8f5b579..fbfed8d 100644
--- a/extensions/browser/api/management/management_api.cc
+++ b/extensions/browser/api/management/management_api.cc
@@ -82,7 +82,7 @@ std::vector<management::LaunchType> GetAvailableLaunchTypes(
launch_type_list.push_back(management::LAUNCH_TYPE_OPEN_AS_REGULAR_TAB);
launch_type_list.push_back(management::LAUNCH_TYPE_OPEN_AS_WINDOW);
- if (!delegate->IsStreamlinedHostedAppsEnabled()) {
+ if (!delegate->IsNewBookmarkAppsEnabled()) {
launch_type_list.push_back(management::LAUNCH_TYPE_OPEN_AS_PINNED_TAB);
launch_type_list.push_back(management::LAUNCH_TYPE_OPEN_FULL_SCREEN);
}
diff --git a/extensions/browser/api/management/management_api_delegate.h b/extensions/browser/api/management/management_api_delegate.h
index c81ef09..6311b3d 100644
--- a/extensions/browser/api/management/management_api_delegate.h
+++ b/extensions/browser/api/management/management_api_delegate.h
@@ -53,9 +53,9 @@ class ManagementAPIDelegate {
const Extension* extension,
content::BrowserContext* context) const = 0;
- // Forwards the call to extensions::util::IsStreamlinedHostedAppsEnabled in
+ // Forwards the call to extensions::util::IsNewBookmarkAppsEnabled in
// chrome.
- virtual bool IsStreamlinedHostedAppsEnabled() const = 0;
+ virtual bool IsNewBookmarkAppsEnabled() const = 0;
// Forwards the call to AppLaunchInfo::GetFullLaunchURL in chrome.
virtual GURL GetFullLaunchURL(const Extension* extension) const = 0;