Chromium Code Reviews

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

Issue 6142013: Allow printing/saving a plugin through right click menu, even if it's in a fr... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: chrome/browser/ui/cocoa/menu_controller.mm
===================================================================
--- chrome/browser/ui/cocoa/menu_controller.mm (revision 70859)
+++ chrome/browser/ui/cocoa/menu_controller.mm (working copy)
@@ -175,6 +175,7 @@
- (NSMenu*)menu {
if (!menu_ && model_) {
menu_.reset([[self menuFromModel:model_] retain]);
+ [menu_ setDelegate:self];
// If this is to be used with a NSPopUpButtonCell, add an item at the 0th
// position that's empty. Doing it after the menu has been constructed won't
// complicate creation logic, and since the tags are model indexes, they
@@ -188,4 +189,8 @@
return menu_.get();
}
+- (void)menuDidClose:(NSMenu*)menu {
+ model_->MenuClosed();
+}
+
@end

Powered by Google App Engine