| Index: chrome/browser/ui/gtk/tabs/tab_strip_gtk.h
|
| ===================================================================
|
| --- chrome/browser/ui/gtk/tabs/tab_strip_gtk.h (revision 141203)
|
| +++ chrome/browser/ui/gtk/tabs/tab_strip_gtk.h (working copy)
|
| @@ -13,6 +13,7 @@
|
| #include "base/compiler_specific.h"
|
| #include "base/memory/weak_ptr.h"
|
| #include "base/message_loop.h"
|
| +#include "chrome/browser/ui/gtk/menu_gtk.h"
|
| #include "chrome/browser/ui/gtk/tabs/tab_gtk.h"
|
| #include "chrome/browser/ui/gtk/tabstrip_origin_provider.h"
|
| #include "chrome/browser/ui/gtk/view_id_util.h"
|
| @@ -28,6 +29,7 @@
|
| class CustomDrawButton;
|
| class DraggedTabControllerGtk;
|
| class GtkThemeService;
|
| +class RecentlyClosedTabsMenuModel;
|
|
|
| namespace gfx {
|
| class Image;
|
| @@ -38,7 +40,8 @@
|
| public MessageLoopForUI::Observer,
|
| public content::NotificationObserver,
|
| public TabstripOriginProvider,
|
| - public ViewIDUtil::Delegate {
|
| + public ViewIDUtil::Delegate,
|
| + public MenuGtk::Delegate {
|
| public:
|
| class TabAnimation;
|
|
|
| @@ -107,6 +110,8 @@
|
| // ViewIDUtil::Delegate implementation ---------------------------------------
|
| virtual GtkWidget* GetWidgetForViewID(ViewID id) OVERRIDE;
|
|
|
| + virtual bool AlwaysShowIconForCmd(int command_id) const OVERRIDE;
|
| +
|
| protected:
|
| // TabStripModelObserver implementation:
|
| virtual void TabInsertedAt(TabContentsWrapper* contents,
|
| @@ -273,6 +278,10 @@
|
| GdkDragContext*, gint, gint, GtkSelectionData*,
|
| guint, guint);
|
|
|
| + // Starts a timer to show the dropdown menu.
|
| + CHROMEGTK_CALLBACK_1(TabStripGtk, gboolean, OnButtonPress,
|
| + GdkEventButton*);
|
| +
|
| // Handles the clicked signal from the new tab button.
|
| CHROMEGTK_CALLBACK_0(TabStripGtk, void, OnNewTabClicked);
|
|
|
| @@ -423,6 +432,10 @@
|
| // Optionally a full Layout will be performed, specified by |layout|.
|
| void FinishAnimation(TabAnimation* animation, bool layout);
|
|
|
| + // Shows the dropdown menu.
|
| + void ShowRecentlyClosedTabsMenu(GtkWidget* widget,
|
| + int button, guint32 event_time);
|
| +
|
| // The Tabs we contain, and their last generated "good" bounds.
|
| std::vector<TabData> tab_data_;
|
|
|
| @@ -496,6 +509,12 @@
|
|
|
| content::NotificationRegistrar registrar_;
|
|
|
| + // The dropdown menu model.
|
| + scoped_ptr<RecentlyClosedTabsMenuModel> menu_model_;
|
| +
|
| + // The menu gets reset every time it is shown.
|
| + scoped_ptr<MenuGtk> menu_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(TabStripGtk);
|
| };
|
|
|
|
|