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

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

Issue 2876223003: cocoa: add some tab-manipulation menu items (Closed)
Patch Set: remove top separator Created 3 years, 7 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
« no previous file with comments | « chrome/browser/ui/browser_commands.cc ('k') | chrome/browser/ui/tabs/tab_strip_model.h » ('j') | 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 f9d82e2344bd623e6d2865f9e034eac6b1432099..092936d8bc211551e8eb7b4a9dbad0fc93f531d2 100644
--- a/chrome/browser/ui/cocoa/browser_window_command_handler.mm
+++ b/chrome/browser/ui/cocoa/browser_window_command_handler.mm
@@ -56,6 +56,18 @@ void UpdateToggleStateWithTag(NSInteger tag, id item, NSWindow* window) {
SetToggleState(prefs->GetBoolean(prefs::kShowFullscreenToolbar), item);
return;
}
+
+ if (tag == IDC_WINDOW_MUTE_TAB) {
+ TabStripModel* model = browser->tab_strip_model();
+ SetToggleState(!model->WillContextMenuMute(model->active_index()), item);
+ return;
+ }
+
+ if (tag == IDC_WINDOW_PIN_TAB) {
+ TabStripModel* model = browser->tab_strip_model();
+ SetToggleState(!model->WillContextMenuPin(model->active_index()), item);
+ return;
+ }
}
NSString* GetTitleForViewsFullscreenMenuItem(Browser* browser) {
« no previous file with comments | « chrome/browser/ui/browser_commands.cc ('k') | chrome/browser/ui/tabs/tab_strip_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698