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

Unified Diff: chrome/browser/ui/cocoa/browser_window_cocoa.mm

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
Index: chrome/browser/ui/cocoa/browser_window_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_cocoa.mm b/chrome/browser/ui/cocoa/browser_window_cocoa.mm
index 00357d6175ce39282020a2bca4d0a262938cc25e..dabfb2de5f1444ce73f062d23babbf48ac6dd553 100644
--- a/chrome/browser/ui/cocoa/browser_window_cocoa.mm
+++ b/chrome/browser/ui/cocoa/browser_window_cocoa.mm
@@ -15,6 +15,7 @@
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/download/download_shelf.h"
+#include "chrome/browser/extensions/extension_util.h"
#include "chrome/browser/extensions/tab_helper.h"
#include "chrome/browser/fullscreen.h"
#include "chrome/browser/profiles/profile.h"
@@ -582,7 +583,11 @@ void BrowserWindowCocoa::ShowBookmarkAppBubble(
base::scoped_nsobject<NSView> view([[NSView alloc]
initWithFrame:NSMakeRect(0, 0, kBookmarkAppBubbleViewWidth,
kBookmarkAppBubbleViewHeight)]);
- [view addSubview:open_as_window_checkbox];
+
+ // When CanHostedAppsOpenInWindows() returns false, do not show the open as
+ // window checkbox to avoid confusing users.
+ if (extensions::util::CanHostedAppsOpenInWindows())
+ [view addSubview:open_as_window_checkbox];
[view addSubview:app_title];
[alert setAccessoryView:view];
« no previous file with comments | « chrome/browser/ui/app_list/app_context_menu.cc ('k') | chrome/browser/ui/views/apps/app_info_dialog/app_info_summary_panel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698