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

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

Issue 6913026: Compact Navigation prototype (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Clang build fix. After commit/revert. Created 9 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/tabs/tab_strip_model.h ('k') | chrome/browser/tabs/tab_strip_model_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tabs/tab_strip_model.cc
===================================================================
--- chrome/browser/tabs/tab_strip_model.cc (revision 84869)
+++ chrome/browser/tabs/tab_strip_model.cc (working copy)
@@ -711,6 +711,10 @@
MoveTabContentsAt(active_index(), new_index, true);
}
+void TabStripModel::ActiveTabClicked(int index) {
+ FOR_EACH_OBSERVER(TabStripModelObserver, observers_, ActiveTabClicked(index));
+}
+
// Context menu functions.
bool TabStripModel::IsContextMenuCommandEnabled(
int context_index, ContextMenuCommand command_id) const {
@@ -764,6 +768,7 @@
delegate_->CanBookmarkAllTabs();
case CommandUseVerticalTabs:
+ case CommandUseCompactNavigationBar:
return true;
case CommandSelectByDomain:
@@ -782,6 +787,8 @@
switch (command_id) {
case CommandUseVerticalTabs:
return delegate()->UseVerticalTabs();
+ case CommandUseCompactNavigationBar:
+ return delegate()->UseCompactNavigationBar();
default:
NOTREACHED();
break;
@@ -904,6 +911,14 @@
break;
}
+ case CommandUseCompactNavigationBar: {
+ UserMetrics::RecordAction(
+ UserMetricsAction("TabContextMenu_CompactNavigationBar"));
+
+ delegate()->ToggleUseCompactNavigationBar();
+ break;
+ }
+
case CommandSelectByDomain:
case CommandSelectByOpener: {
std::vector<int> indices;
@@ -1029,6 +1044,9 @@
case CommandUseVerticalTabs:
*browser_cmd = IDC_TOGGLE_VERTICAL_TABS;
break;
+ case CommandUseCompactNavigationBar:
+ *browser_cmd = IDC_COMPACT_NAVBAR;
+ break;
default:
*browser_cmd = 0;
return false;
« no previous file with comments | « chrome/browser/tabs/tab_strip_model.h ('k') | chrome/browser/tabs/tab_strip_model_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698