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

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: Launch logic in app info summary panel 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..e11827b93863ec3c43d2adc7a298cbc92ec10cf7 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,8 @@ void BrowserWindowCocoa::ShowBookmarkAppBubble(
base::scoped_nsobject<NSView> view([[NSView alloc]
initWithFrame:NSMakeRect(0, 0, kBookmarkAppBubbleViewWidth,
kBookmarkAppBubbleViewHeight)]);
- [view addSubview:open_as_window_checkbox];
+ if (extensions::util::CanHostedAppsOpenInWindows())
tapted 2015/08/19 06:48:13 nit: comment here like "Omit the Open As Window ch
dominickn 2015/08/19 07:10:41 Done.
+ [view addSubview:open_as_window_checkbox];
[view addSubview:app_title];
[alert setAccessoryView:view];
@@ -606,7 +608,10 @@ void BrowserWindowCocoa::ShowBookmarkAppBubble(
if (response == NSAlertFirstButtonReturn) {
WebApplicationInfo updated_info = web_app_info;
- updated_info.open_as_window = [open_as_window_checkbox state] == NSOnState;
+ if (extensions::util::CanHostedAppsOpenInWindows()) {
tapted 2015/08/19 06:48:13 Is this to address something specific? (I think we
dominickn 2015/08/19 07:10:41 Digging deeper, it looks like it doesn't doesn't h
+ updated_info.open_as_window =
+ [open_as_window_checkbox state] == NSOnState;
+ }
updated_info.title = TrimText([app_title stringValue]);
callback.Run(true, updated_info);

Powered by Google App Engine
This is Rietveld 408576698