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

Unified Diff: chrome/browser/ui/gtk/tabs/tab_strip_gtk.h

Issue 10561003: Implementaion for showing recently closed tabs list on right clicking new tab button. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 6 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 | « no previous file | chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « no previous file | chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698