Chromium Code Reviews| Index: chrome/browser/extensions/launch_util.cc |
| diff --git a/chrome/browser/extensions/launch_util.cc b/chrome/browser/extensions/launch_util.cc |
| index 37faf2adb6bcd6eddbf68c11dfb760358cdb3a3f..09e4f18e3de39bf0abed44a59faeb8496c50cd43 100644 |
| --- a/chrome/browser/extensions/launch_util.cc |
| +++ b/chrome/browser/extensions/launch_util.cc |
| @@ -4,10 +4,12 @@ |
| #include "chrome/browser/extensions/launch_util.h" |
| +#include "base/command_line.h" |
| #include "base/values.h" |
| #include "chrome/browser/extensions/extension_sync_service.h" |
| #include "chrome/browser/profiles/profile.h" |
| #include "chrome/browser/ui/host_desktop.h" |
| +#include "chrome/common/chrome_switches.h" |
| #include "chrome/common/extensions/extension_constants.h" |
| #include "chrome/common/extensions/manifest_handlers/app_launch_info.h" |
| #include "components/pref_registry/pref_registry_syncable.h" |
| @@ -49,6 +51,14 @@ LaunchType GetLaunchType(const ExtensionPrefs* prefs, |
| if (value >= LAUNCH_TYPE_FIRST && value < NUM_LAUNCH_TYPES) |
| result = static_cast<LaunchType>(value); |
| +#if defined(OS_MACOSX) |
| + // On Mac, opening in a window is only supported if bookmark apps are enabled. |
| + if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| + switches::kDisableNewBookmarkApps) && |
|
benwells
2015/02/16 07:52:19
Please use IsNewBookmarkAppsEnabled instead (https
jackhou1
2015/02/16 23:20:27
Done.
|
| + !extension->is_platform_app() && result == LAUNCH_TYPE_WINDOW) |
| + result = LAUNCH_TYPE_REGULAR; |
| +#endif |
| + |
| return result; |
| } |