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..907f9051617fb5f73c4bf291345034f6bf01b3e6 100644 |
--- a/chrome/browser/extensions/launch_util.cc |
+++ b/chrome/browser/extensions/launch_util.cc |
@@ -49,9 +49,14 @@ 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. CanHostedAppsOpenInWindows() is false |
+ if (!extension->is_platform_app() && result == LAUNCH_TYPE_WINDOW && |
+ !extensions::util::CanHostedAppsOpenInWindows()) { |
result = LAUNCH_TYPE_REGULAR; |
+ } |
#else |
if (extensions::util::IsNewBookmarkAppsEnabled()) { |
if (result == LAUNCH_TYPE_PINNED) |