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

Unified Diff: chrome/browser/app_controller_mac.mm

Issue 1681863005: Added the "Show as Tab" option for popups on OSX (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit Created 4 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
Index: chrome/browser/app_controller_mac.mm
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm
index d9eceb7e699a1c6e103afbc9eb876896ca1e2c0a..a302cfe5b86b962effb1f3c6860b836312232044 100644
--- a/chrome/browser/app_controller_mac.mm
+++ b/chrome/browser/app_controller_mac.mm
@@ -982,6 +982,14 @@ class AppControllerProfileObserver : public ProfileInfoCacheObserver {
![self keyWindowIsModal] : NO;
}
}
+
+ // "Show as tab" should only appear when the current window is a popup.
+ // Since |validateUserInterfaceItem:| is called only when there are no
+ // key windows, we should just hide this.
+ if (tag == IDC_SHOW_AS_TAB) {
spqchan 2016/02/10 02:34:48 Note: I'm handling this outside of the switch stat
Avi (use Gerrit) 2016/02/10 06:05:04 If you have to note it in a comment to me, is it s
spqchan 2016/02/10 17:27:06 Fair enough
+ NSMenuItem* menuItem = base::mac::ObjCCast<NSMenuItem>(item);
+ [menuItem setHidden:YES];
+ }
} else if (action == @selector(terminate:)) {
enable = YES;
} else if (action == @selector(showPreferences:)) {

Powered by Google App Engine
This is Rietveld 408576698