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); |
}; |