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

Unified Diff: chrome/browser/ui/browser_commands.cc

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.h ('k') | chrome/browser/ui/cocoa/browser_window_command_handler.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_commands.cc
diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc
index 713c98e71d7d376088dae290a89663ea587b7d31..54582710f9eeabe66591d594472edeb84fde23ee 100644
--- a/chrome/browser/ui/browser_commands.cc
+++ b/chrome/browser/ui/browser_commands.cc
@@ -740,6 +740,18 @@ bool CanDuplicateTabAt(const Browser* browser, int index) {
contents->GetController().GetLastCommittedEntry();
}
+void PinTab(Browser* browser) {
+ browser->tab_strip_model()->ExecuteContextMenuCommand(
+ browser->tab_strip_model()->active_index(),
+ TabStripModel::ContextMenuCommand::CommandTogglePinned);
+}
+
+void MuteTab(Browser* browser) {
+ browser->tab_strip_model()->ExecuteContextMenuCommand(
+ browser->tab_strip_model()->active_index(),
+ TabStripModel::ContextMenuCommand::CommandToggleTabAudioMuted);
+}
+
void ConvertPopupToTabbedBrowser(Browser* browser) {
base::RecordAction(UserMetricsAction("ShowAsTab"));
TabStripModel* tab_strip = browser->tab_strip_model();
« no previous file with comments | « chrome/browser/ui/browser_commands.h ('k') | chrome/browser/ui/cocoa/browser_window_command_handler.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698