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

Unified Diff: chrome/browser/tabs/tab_strip_model.cc

Issue 1001003: Allow dynamic switching in and out of sidetabs mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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
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();
}

Powered by Google App Engine
This is Rietveld 408576698