Index: chrome/browser/ui/views/wrench_menu.cc |
=================================================================== |
--- chrome/browser/ui/views/wrench_menu.cc (revision 104036) |
+++ chrome/browser/ui/views/wrench_menu.cc (working copy) |
@@ -14,6 +14,7 @@ |
#include "chrome/browser/ui/browser.h" |
#include "chrome/browser/ui/browser_window.h" |
#include "chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.h" |
+#include "chrome/common/chrome_notification_types.h" |
#include "content/browser/tab_contents/tab_contents.h" |
#include "content/browser/user_metrics.h" |
#include "content/common/content_notification_types.h" |
@@ -568,6 +569,8 @@ |
selected_index_(0), |
bookmark_menu_(NULL), |
first_bookmark_command_id_(0) { |
+ registrar_.Add(this, chrome::NOTIFICATION_GLOBAL_ERRORS_CHANGED, |
+ Source<Profile>(browser_->profile())); |
} |
WrenchMenu::~WrenchMenu() { |
@@ -769,6 +772,19 @@ |
root_->Cancel(); |
} |
+ |
+void WrenchMenu::Observe(int type, |
+ const NotificationSource& source, |
+ const NotificationDetails& details) { |
+ switch (type) { |
+ case chrome::NOTIFICATION_GLOBAL_ERRORS_CHANGED: |
+ root_->Cancel(); |
sky
2011/10/10 21:13:47
Add a comment as to why we need this.
sail
2011/10/10 21:18:24
Done.
|
+ break; |
+ default: |
+ NOTREACHED(); |
+ } |
+} |
+ |
void WrenchMenu::PopulateMenu(MenuItemView* parent, |
MenuModel* model, |
int* next_id) { |