Index: chrome/browser/extensions/launch_util.cc |
diff --git a/chrome/browser/extensions/launch_util.cc b/chrome/browser/extensions/launch_util.cc |
index 94b8be51d227067522a35940412013f79e0a6034..b1d0f266ab1d15f8072487fe8236d05d11c298c3 100644 |
--- a/chrome/browser/extensions/launch_util.cc |
+++ b/chrome/browser/extensions/launch_util.cc |
@@ -49,9 +49,16 @@ LaunchType GetLaunchType(const ExtensionPrefs* prefs, |
result = static_cast<LaunchType>(value); |
#if defined(OS_MACOSX) |
- // On Mac, opening in a window is currently disabled for non platform apps. |
- if (!extension->is_platform_app() && result == LAUNCH_TYPE_WINDOW) |
+ // Disable opening as window on Mac if: |
+ // 1. the extension isn't a platform app, AND |
+ // 2. the intended result is open as window, AND |
+ // 3. one of IsNewBookmarkAppsEnabled() or CanHostedAppsOpenInWindows() are |
benwells
2015/08/19 02:39:21
Why does this depend on IsNewBookmarkAppsEnabled a
dominickn
2015/08/19 03:01:13
I kept it like this because the new bookmark apps
benwells
2015/08/19 03:26:52
I'm not sure, but it shouldn't depend on the curre
dominickn
2015/08/19 05:21:58
Done.
|
+ // false |
+ if (!extension->is_platform_app() && result == LAUNCH_TYPE_WINDOW && |
+ (!extensions::util::IsNewBookmarkAppsEnabled() || |
+ !extensions::util::CanHostedAppsOpenInWindows())) { |
result = LAUNCH_TYPE_REGULAR; |
+ } |
#else |
if (extensions::util::IsNewBookmarkAppsEnabled()) { |
if (result == LAUNCH_TYPE_PINNED) |