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

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: Addressing nits 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
« no previous file with comments | « chrome/browser/extensions/extension_util.cc ('k') | chrome/browser/ui/app_list/app_context_menu.cc » ('j') | 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 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)
« no previous file with comments | « chrome/browser/extensions/extension_util.cc ('k') | chrome/browser/ui/app_list/app_context_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698