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

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: 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..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;
}
« 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