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

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

Issue 921103003: [Mac] Always launch in tab if bookmark apps are disabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use IsNewBookmarkAppsEnabled Created 5 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..3def89780fcde0b49b47c6b133ec584e84059fe5 100644
--- a/chrome/browser/extensions/launch_util.cc
+++ b/chrome/browser/extensions/launch_util.cc
@@ -6,6 +6,7 @@
#include "base/values.h"
#include "chrome/browser/extensions/extension_sync_service.h"
+#include "chrome/browser/extensions/extension_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/host_desktop.h"
#include "chrome/common/extensions/extension_constants.h"
@@ -49,6 +50,13 @@ 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 (!extensions::util::IsNewBookmarkAppsEnabled() &&
+ !extension->is_platform_app() && result == LAUNCH_TYPE_WINDOW)
+ result = LAUNCH_TYPE_REGULAR;
+#endif
+
return result;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698