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

Unified Diff: chrome/browser/views/tabs/browser_tab_strip_controller.h

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/views/tabs/browser_tab_strip_controller.h
===================================================================
--- chrome/browser/views/tabs/browser_tab_strip_controller.h (revision 41630)
+++ chrome/browser/views/tabs/browser_tab_strip_controller.h (working copy)
@@ -5,6 +5,8 @@
#ifndef CHROME_BROWSER_VIEWS_TABS_BROWSER_TAB_STRIP_CONTROLLER_H_
#define CHROME_BROWSER_VIEWS_TABS_BROWSER_TAB_STRIP_CONTROLLER_H_
+#include "base/scoped_ptr.h"
+
#include "chrome/browser/tabs/tab_strip_model.h"
#include "chrome/browser/views/tabs/side_tab_strip_model.h"
@@ -18,6 +20,15 @@
BrowserTabStripController(TabStripModel* model, SideTabStrip* tabstrip);
virtual ~BrowserTabStripController();
+ void InitFromModel();
+
+ bool IsCommandEnabledForTab(TabStripModel::ContextMenuCommand command_id,
+ int tab_index) const;
+ bool IsCommandCheckedForTab(TabStripModel::ContextMenuCommand command_id,
+ int tab_index) const;
+ void ExecuteCommandForTab(TabStripModel::ContextMenuCommand command_id,
+ int tab_index);
+
// SideTabStripModel implementation:
virtual SkBitmap GetIcon(int index) const;
virtual string16 GetTitle(int index) const;
@@ -25,6 +36,7 @@
virtual NetworkState GetNetworkState(int index) const;
virtual void SelectTab(int index);
virtual void CloseTab(int index);
+ virtual void ShowContextMenu(int index, const gfx::Point& p);
// TabStripModelObserver implementation:
virtual void TabInsertedAt(TabContents* contents, int index,
@@ -46,6 +58,10 @@
TabStripModel* model_;
SideTabStrip* tabstrip_;
+ // If non-NULL it means we're showing a menu for the tab.
+ class TabContextMenuContents;
sky 2010/03/19 16:14:02 move class definition before all fields.
+ scoped_ptr<TabContextMenuContents> context_menu_contents_;
+
DISALLOW_COPY_AND_ASSIGN(BrowserTabStripController);
};

Powered by Google App Engine
This is Rietveld 408576698