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

Unified Diff: chrome/browser/ui/views/wrench_menu.h

Issue 8201006: Views: Rebuild wrench menu if error is added or removed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 9 years, 2 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/views/toolbar_view.cc ('k') | chrome/browser/ui/views/wrench_menu.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/wrench_menu.h
===================================================================
--- chrome/browser/ui/views/wrench_menu.h (revision 104036)
+++ chrome/browser/ui/views/wrench_menu.h (working copy)
@@ -11,6 +11,8 @@
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/bookmarks/base_bookmark_model_observer.h"
+#include "content/common/notification_observer.h"
+#include "content/common/notification_registrar.h"
#include "ui/base/models/menu_model.h"
#include "views/controls/menu/menu_delegate.h"
@@ -26,7 +28,8 @@
// WrenchMenu adapts the WrenchMenuModel to view's menu related classes.
class WrenchMenu : public views::MenuDelegate,
- public BaseBookmarkModelObserver {
+ public BaseBookmarkModelObserver,
+ public NotificationObserver {
public:
explicit WrenchMenu(Browser* browser);
virtual ~WrenchMenu();
@@ -71,6 +74,11 @@
// BaseBookmarkModelObserver overrides:
virtual void BookmarkModelChanged() OVERRIDE;
+ // NotificationObserver overrides:
+ virtual void Observe(int type,
+ const NotificationSource& source,
+ const NotificationDetails& details) OVERRIDE;
+
private:
class CutCopyPasteView;
class ZoomView;
@@ -134,6 +142,8 @@
// ID to use for the items representing bookmarks in the bookmark menu.
int first_bookmark_command_id_;
+ NotificationRegistrar registrar_;
+
DISALLOW_COPY_AND_ASSIGN(WrenchMenu);
};
« no previous file with comments | « chrome/browser/ui/views/toolbar_view.cc ('k') | chrome/browser/ui/views/wrench_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698