Index: chrome/browser/tabs/tab_strip_model.cc |
=================================================================== |
--- chrome/browser/tabs/tab_strip_model.cc (revision 41630) |
+++ chrome/browser/tabs/tab_strip_model.cc (working copy) |
@@ -574,15 +574,28 @@ |
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 { |
sky
2010/03/19 16:14:02
nit: > 80
|
+ switch (command_id) { |
+ case CommandUseVerticalTabs: |
+ return delegate()->UseVerticalTabs(); |
+ default: |
+ NOTREACHED(); |
+ break; |
+ } |
+ return false; |
+} |
+ |
void TabStripModel::ExecuteContextMenuCommand( |
int context_index, ContextMenuCommand command_id) { |
DCHECK(command_id > CommandFirst && command_id < CommandLast); |
@@ -656,6 +669,12 @@ |
delegate_->BookmarkAllTabs(); |
break; |
} |
+ case CommandUseVerticalTabs: { |
+ UserMetrics::RecordAction("TabContextMenu_UseVerticalTabs", profile_); |
+ |
+ delegate()->ToggleUseVerticalTabs(); |
+ break; |
+ } |
default: |
NOTREACHED(); |
} |