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

Unified Diff: chrome/browser/ui/cocoa/wrench_menu_controller.mm

Issue 5906002: Reset bg page badge when wrench menu closes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/wrench_menu_controller.mm
diff --git a/chrome/browser/ui/cocoa/wrench_menu_controller.mm b/chrome/browser/ui/cocoa/wrench_menu_controller.mm
index 3abd3aabfa33dcc9ad32f35af0ed1a84429f8af0..fcbada650e7fbe77634a907edf19069421917b24 100644
--- a/chrome/browser/ui/cocoa/wrench_menu_controller.mm
+++ b/chrome/browser/ui/cocoa/wrench_menu_controller.mm
@@ -8,6 +8,7 @@
#include "app/menus/menu_model.h"
#include "base/sys_string_conversions.h"
#include "chrome/app/chrome_command_ids.h"
+#include "chrome/browser/background_page_tracker.h"
#import "chrome/browser/ui/cocoa/menu_tracked_root_view.h"
#import "chrome/browser/ui/cocoa/toolbar_controller.h"
#include "chrome/browser/ui/browser.h"
@@ -121,6 +122,12 @@ class ZoomLevelObserver : public NotificationObserver {
[zoomFullScreen_ setImage:icon];
}
+- (void)menuDidClose:(NSMenu*)menu {
+ // When the menu is closed, acknowledge the background pages so the badges go
+ // away.
+ BackgroundPageTracker::GetInstance()->AcknowledgeBackgroundPages();
+}
+
// Used to dispatch commands from the Wrench menu. The custom items within the
// menu cannot be hooked up directly to First Responder because the window in
// which the controls reside is not the BrowserWindowController, but a
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698