summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tabs/tab_strip_model.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/tabs/tab_strip_model.cc')
-rw-r--r--chrome/browser/tabs/tab_strip_model.cc24
1 files changed, 22 insertions, 2 deletions
diff --git a/chrome/browser/tabs/tab_strip_model.cc b/chrome/browser/tabs/tab_strip_model.cc
index 2fba4b5..dc9b968 100644
--- a/chrome/browser/tabs/tab_strip_model.cc
+++ b/chrome/browser/tabs/tab_strip_model.cc
@@ -574,11 +574,25 @@ bool TabStripModel::IsContextMenuCommandEnabled(
return delegate_->CanRestoreTab();
case CommandTogglePinned:
return true;
- case CommandBookmarkAllTabs: {
+ case CommandBookmarkAllTabs:
return delegate_->CanBookmarkAllTabs();
- }
+ case CommandUseVerticalTabs:
+ return true;
+ default:
+ NOTREACHED();
+ }
+ return false;
+}
+
+bool TabStripModel::IsContextMenuCommandChecked(
+ int context_index,
+ ContextMenuCommand command_id) const {
+ switch (command_id) {
+ case CommandUseVerticalTabs:
+ return delegate()->UseVerticalTabs();
default:
NOTREACHED();
+ break;
}
return false;
}
@@ -656,6 +670,12 @@ void TabStripModel::ExecuteContextMenuCommand(
delegate_->BookmarkAllTabs();
break;
}
+ case CommandUseVerticalTabs: {
+ UserMetrics::RecordAction("TabContextMenu_UseVerticalTabs", profile_);
+
+ delegate()->ToggleUseVerticalTabs();
+ break;
+ }
default:
NOTREACHED();
}