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

Unified Diff: chrome/browser/gtk/bookmark_bar_gtk.h

Issue 200029: Make the bookmark toolbar folders act like a menu bar.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: lint Created 11 years, 3 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/gtk/bookmark_bar_gtk.cc » ('j') | chrome/common/gtk_util.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/bookmark_bar_gtk.h
===================================================================
--- chrome/browser/gtk/bookmark_bar_gtk.h (revision 25344)
+++ chrome/browser/gtk/bookmark_bar_gtk.h (working copy)
@@ -8,10 +8,12 @@
#include <gtk/gtk.h>
#include <string>
+#include <vector>
#include "app/slide_animation.h"
#include "base/scoped_ptr.h"
#include "chrome/browser/bookmarks/bookmark_model_observer.h"
+#include "chrome/browser/gtk/menu_bar_helper.h"
#include "chrome/browser/gtk/view_id_util.h"
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
@@ -28,6 +30,7 @@
class BookmarkBarGtk : public AnimationDelegate,
public BookmarkModelObserver,
+ public MenuBarHelper::Delegate,
public NotificationObserver {
public:
explicit BookmarkBarGtk(Profile* profile, Browser* browser,
@@ -76,6 +79,10 @@
virtual void AnimationProgressed(const Animation* animation);
virtual void AnimationEnded(const Animation* animation);
+ // MenuBarHelper::Delegate implementation ------------------------------------
+ virtual void PopupForButton(GtkWidget* button);
+ virtual void PopupForButtonNextTo(GtkWidget* button,
+ GtkMenuDirectionType dir);
private:
// Helper function which generates GtkToolItems for |bookmark_toolbar_|.
void CreateAllBookmarkButtons();
@@ -104,7 +111,10 @@
// |extra_space| is how much extra space to give the toolbar during the
// calculation (for the purposes of determining if ditching the chevron
// would be a good idea).
- int GetFirstHiddenBookmark(int extra_space);
+ // If non-NULL, |showing_folders| is packed with all the folders that are
+ // showing on the bar.
+ int GetFirstHiddenBookmark(int extra_space,
+ std::vector<GtkWidget*>* showing_folders);
// Overridden from BookmarkModelObserver:
@@ -252,6 +262,8 @@
// Whether we should show the instructional text in the bookmark bar.
bool show_instructions_;
+ MenuBarHelper menu_bar_helper_;
+
// The last displayed right click menu, or NULL if no menus have been
// displayed yet.
scoped_ptr<BookmarkContextMenu> current_context_menu_;
« no previous file with comments | « no previous file | chrome/browser/gtk/bookmark_bar_gtk.cc » ('j') | chrome/common/gtk_util.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698