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

Unified Diff: chrome/browser/extensions/launch_util.cc

Issue 1300763002: Add a flag to enable open in window for hosted apps on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@disable-new-bookmark-apps
Patch Set: Clarifying logic for open in window Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
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)

Powered by Google App Engine
This is Rietveld 408576698