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

Unified Diff: chrome/browser/ui/gtk/global_bookmark_menu.h

Issue 7017028: Revert "Revert 85330 - GTK: Bring global menu out of about:flags." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 years, 7 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 | « chrome/browser/ui/gtk/browser_window_gtk.cc ('k') | chrome/browser/ui/gtk/global_bookmark_menu.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/global_bookmark_menu.h
diff --git a/chrome/browser/ui/gtk/global_bookmark_menu.h b/chrome/browser/ui/gtk/global_bookmark_menu.h
index 087424327a450cec27477102e0a9b6d969dec117..eae9e0b28b0fced3960d0af8d0c2dd58cca48436 100644
--- a/chrome/browser/ui/gtk/global_bookmark_menu.h
+++ b/chrome/browser/ui/gtk/global_bookmark_menu.h
@@ -10,6 +10,8 @@
#include "base/compiler_specific.h"
#include "base/task.h"
#include "chrome/browser/bookmarks/bookmark_model_observer.h"
+#include "chrome/browser/ui/gtk/global_menu_owner.h"
+#include "chrome/browser/ui/gtk/owned_widget_gtk.h"
#include "content/common/notification_observer.h"
#include "content/common/notification_registrar.h"
#include "ui/base/gtk/gtk_signal.h"
@@ -28,14 +30,15 @@ typedef struct _GtkWidget GtkWidget;
// need to update the menu in the background (instead of building it on showing
// and not updating it if the model changes). I'm not even thinking about
// making these draggable since these items aren't displayed in our process.
-class GlobalBookmarkMenu : public NotificationObserver,
+class GlobalBookmarkMenu : public GlobalMenuOwner,
+ public NotificationObserver,
public BookmarkModelObserver {
public:
explicit GlobalBookmarkMenu(Browser* browser);
virtual ~GlobalBookmarkMenu();
// Takes the bookmark menu we need to modify based on bookmark state.
- void Init(GtkWidget* bookmark_menu);
+ virtual void Init(GtkWidget* bookmark_menu, GtkWidget* bookmark_menu_item);
private:
// Schedules the menu to be rebuilt. The mac version sets a boolean and
@@ -111,7 +114,7 @@ class GlobalBookmarkMenu : public NotificationObserver,
GdkPixbuf* default_favicon_;
GdkPixbuf* default_folder_;
- GtkWidget* bookmark_menu_;
+ OwnedWidgetGtk bookmark_menu_;
// We use this factory to create callback tasks for ThreadWatcher object. We
// use this during ping-pong messaging between WatchDog thread and watched
« no previous file with comments | « chrome/browser/ui/gtk/browser_window_gtk.cc ('k') | chrome/browser/ui/gtk/global_bookmark_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698