diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-29 05:37:53 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-29 05:37:53 +0000 |
commit | 12c68c2f1f05cd8fbe453694b4c04ac25d08c1a8 (patch) | |
tree | b7f34c6082f0251e5237db4c524a7b46acc5980e /chrome/browser/tabs | |
parent | f381dfa196a8da9382ff6c4b109216b5d166c148 (diff) | |
download | chromium_src-12c68c2f1f05cd8fbe453694b4c04ac25d08c1a8.zip chromium_src-12c68c2f1f05cd8fbe453694b4c04ac25d08c1a8.tar.gz chromium_src-12c68c2f1f05cd8fbe453694b4c04ac25d08c1a8.tar.bz2 |
Revert 45906 - Relands your patch to have an option for enabling vertical tabs. I've
added the following additions:
. made the layout work for opaque_browser_frame.
. Only show the menu if the user supplied enableverticaltabs.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/1708014
TBR=sky@chromium.org
Review URL: http://codereview.chromium.org/1795010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45915 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tabs')
-rw-r--r-- | chrome/browser/tabs/tab_strip_model.cc | 25 | ||||
-rw-r--r-- | chrome/browser/tabs/tab_strip_model.h | 11 | ||||
-rw-r--r-- | chrome/browser/tabs/tab_strip_model_unittest.cc | 2 |
3 files changed, 2 insertions, 36 deletions
diff --git a/chrome/browser/tabs/tab_strip_model.cc b/chrome/browser/tabs/tab_strip_model.cc index a1b1355..b5095a2 100644 --- a/chrome/browser/tabs/tab_strip_model.cc +++ b/chrome/browser/tabs/tab_strip_model.cc @@ -574,24 +574,11 @@ 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; } @@ -668,14 +655,6 @@ void TabStripModel::ExecuteContextMenuCommand( delegate_->BookmarkAllTabs(); break; } - case CommandUseVerticalTabs: { - UserMetrics::RecordAction( - UserMetricsAction("TabContextMenu_UseVerticalTabs"), - profile_); - - delegate()->ToggleUseVerticalTabs(); - break; - } default: NOTREACHED(); } diff --git a/chrome/browser/tabs/tab_strip_model.h b/chrome/browser/tabs/tab_strip_model.h index 90b4419..427fb6e 100644 --- a/chrome/browser/tabs/tab_strip_model.h +++ b/chrome/browser/tabs/tab_strip_model.h @@ -223,12 +223,6 @@ class TabStripModelDelegate { // Creates a bookmark folder containing a bookmark for all open tabs. virtual void BookmarkAllTabs() = 0; - - // Returns true if the vertical tabstrip presentation should be used. - virtual bool UseVerticalTabs() const = 0; - - // Toggles the use of the vertical tabstrip. - virtual void ToggleUseVerticalTabs() = 0; }; //////////////////////////////////////////////////////////////////////////////// @@ -553,7 +547,6 @@ class TabStripModel : public NotificationObserver { CommandRestoreTab, CommandTogglePinned, CommandBookmarkAllTabs, - CommandUseVerticalTabs, CommandLast }; @@ -561,10 +554,6 @@ class TabStripModel : public NotificationObserver { bool IsContextMenuCommandEnabled(int context_index, ContextMenuCommand command_id) const; - // Returns true if the specified command is checked. - bool IsContextMenuCommandChecked(int context_index, - ContextMenuCommand command_id) const; - // Performs the action associated with the specified command for the given // TabStripModel index |context_index|. void ExecuteContextMenuCommand(int context_index, diff --git a/chrome/browser/tabs/tab_strip_model_unittest.cc b/chrome/browser/tabs/tab_strip_model_unittest.cc index 44c56e6..451cc81 100644 --- a/chrome/browser/tabs/tab_strip_model_unittest.cc +++ b/chrome/browser/tabs/tab_strip_model_unittest.cc @@ -71,8 +71,6 @@ class TabStripDummyDelegate : public TabStripModelDelegate { virtual bool CanCloseContentsAt(int index) { return can_close_ ; } virtual bool CanBookmarkAllTabs() const { return false; } virtual void BookmarkAllTabs() {} - virtual bool UseVerticalTabs() const { return false; } - virtual void ToggleUseVerticalTabs() {} private: // A dummy TabContents we give to callers that expect us to actually build a |