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

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

Issue 869483003: Reverse logic of window / tab control in bookmark app creation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac Created 5 years, 11 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 456a27e6c3071852cea1263368e4dbd66edd6fa3..8854ab854215fc4a08dbb2ccd8d1cb6164658081 100644
--- a/chrome/browser/ui/cocoa/browser_window_cocoa.mm
+++ b/chrome/browser/ui/cocoa/browser_window_cocoa.mm
@@ -515,16 +515,16 @@ void BrowserWindowCocoa::ShowBookmarkAppBubble(
[alert addButtonWithTitle:l10n_util::GetNSString(IDS_CANCEL)];
[cancel_button setKeyEquivalent:kKeyEquivalentEscape];
- base::scoped_nsobject<NSButton> open_as_tab_checkbox(
+ base::scoped_nsobject<NSButton> open_as_window_checkbox(
[[NSButton alloc] initWithFrame:NSZeroRect]);
- [open_as_tab_checkbox setButtonType:NSSwitchButton];
- [open_as_tab_checkbox
- setTitle:l10n_util::GetNSString(IDS_BOOKMARK_APP_BUBBLE_OPEN_AS_TAB)];
- [open_as_tab_checkbox setState:
+ [open_as_window_checkbox setButtonType:NSSwitchButton];
+ [open_as_window_checkbox
+ setTitle:l10n_util::GetNSString(IDS_BOOKMARK_APP_BUBBLE_OPEN_AS_WINDOW)];
+ [open_as_window_checkbox setState:
profile->GetPrefs()->GetInteger(
extensions::pref_names::kBookmarkAppCreationLaunchType) ==
- extensions::LAUNCH_TYPE_REGULAR];
- [open_as_tab_checkbox sizeToFit];
+ extensions::LAUNCH_TYPE_WINDOW];
+ [open_as_window_checkbox sizeToFit];
base::scoped_nsobject<NSTextField> app_title([[NSTextField alloc]
initWithFrame:NSMakeRect(0, kAppTextFieldHeight +
@@ -538,7 +538,7 @@ void BrowserWindowCocoa::ShowBookmarkAppBubble(
base::scoped_nsobject<NSView> view([[NSView alloc]
initWithFrame:NSMakeRect(0, 0, kBookmarkAppBubbleViewWidth,
kBookmarkAppBubbleViewHeight)]);
- [view addSubview:open_as_tab_checkbox];
+ [view addSubview:open_as_window_checkbox];
[view addSubview:app_title];
[alert setAccessoryView:view];
@@ -560,9 +560,9 @@ void BrowserWindowCocoa::ShowBookmarkAppBubble(
if ([alert runModal] == NSAlertFirstButtonReturn) {
// Save launch type preferences for later when creating another hosted app.
extensions::LaunchType launch_type =
- [open_as_tab_checkbox state] == NSOnState
- ? extensions::LAUNCH_TYPE_REGULAR
- : extensions::LAUNCH_TYPE_WINDOW;
+ [open_as_window_checkbox state] == NSOnState
+ ? extensions::LAUNCH_TYPE_WINDOW
+ : extensions::LAUNCH_TYPE_REGULAR;
profile->GetPrefs()->SetInteger(
extensions::pref_names::kBookmarkAppCreationLaunchType, launch_type);
extensions::SetLaunchType(service, extension_id, launch_type);
« no previous file with comments | « chrome/browser/extensions/launch_util.cc ('k') | chrome/browser/ui/views/extensions/bookmark_app_bubble_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698