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

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

Issue 2475433006: Add "Cast..." menu item to macOS menu bar (Closed)
Patch Set: Created 4 years, 1 month 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/app/nibs/MainMenu.xib ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/browser_window_command_handler.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_command_handler.mm b/chrome/browser/ui/cocoa/browser_window_command_handler.mm
index 7c5478f753c3afe8bd39c57d141d46f3a4579c39..7e62c7e1efd3d142cac21b21e712cecf6cb1c3bc 100644
--- a/chrome/browser/ui/cocoa/browser_window_command_handler.mm
+++ b/chrome/browser/ui/cocoa/browser_window_command_handler.mm
@@ -8,6 +8,7 @@
#import "base/mac/foundation_util.h"
#include "chrome/app/chrome_command_ids.h"
#import "chrome/browser/app_controller_mac.h"
+#include "chrome/browser/media/router/media_router_feature.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/bookmarks/bookmark_utils.h"
#include "chrome/browser/ui/browser_commands.h"
@@ -162,6 +163,13 @@ Browser* FindBrowserForSender(id sender, NSWindow* window) {
[menuItem setHidden:browser->is_type_tabbed() || browser->is_devtools()];
break;
}
+ case IDC_ROUTE_MEDIA: {
+ // Hide this menu option if Media Router is disabled.
+ NSMenuItem* menuItem = base::mac::ObjCCast<NSMenuItem>(item);
+ [menuItem
+ setHidden:!media_router::MediaRouterEnabled(browser->profile())];
+ break;
+ }
default:
break;
}
« no previous file with comments | « chrome/app/nibs/MainMenu.xib ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698