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

Unified Diff: chrome/browser/cocoa/delayedmenu_button.mm

Issue 251091: Mac: Eliminate unintended "menu" method overrides. (Closed)
Patch Set: Created 11 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/cocoa/delayedmenu_button.h ('k') | chrome/browser/cocoa/delayedmenu_button_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/delayedmenu_button.mm
diff --git a/chrome/browser/cocoa/delayedmenu_button.mm b/chrome/browser/cocoa/delayedmenu_button.mm
index 2be6928ed34f73b79a383863024c8365b37ba237..458bf28b3be62380c64ca9181fe0b82186b3ea7f 100644
--- a/chrome/browser/cocoa/delayedmenu_button.mm
+++ b/chrome/browser/cocoa/delayedmenu_button.mm
@@ -11,7 +11,7 @@
@interface DelayedMenuButton (Private)
- (void)setupCell;
-- (void)menuAction:(id)sender;
+- (void)attachedMenuAction:(id)sender;
@end // @interface DelayedMenuButton (Private)
@@ -42,7 +42,7 @@
}
- (void)dealloc {
- [menu_ release];
+ [attachedMenu_ release];
[super dealloc];
}
@@ -57,16 +57,16 @@
// Accessors and mutators:
-@synthesize menu = menu_;
+@synthesize attachedMenu = attachedMenu_;
-// Don't synthesize for menuEnabled_; its mutator must do other things.
-- (void)setMenuEnabled:(BOOL)enabled {
- menuEnabled_ = enabled;
- [[self cell] setEnableClickHold:menuEnabled_];
+// Don't synthesize for attachedMenuEnabled_; its mutator must do other things.
+- (void)setAttachedMenuEnabled:(BOOL)enabled {
+ attachedMenuEnabled_ = enabled;
+ [[self cell] setEnableClickHold:attachedMenuEnabled_];
}
-- (BOOL)menuEnabled {
- return menuEnabled_;
+- (BOOL)attachedMenuEnabled {
+ return attachedMenuEnabled_;
}
@end // @implementation DelayedMenuButton
@@ -81,19 +81,19 @@
[self setEnabled:NO]; // Make the controller put in a menu and
// enable it explicitly. This also takes
// care of |[cell setEnableClickHold:]|.
- [cell setClickHoldAction:@selector(menuAction:)];
+ [cell setClickHoldAction:@selector(attachedMenuAction:)];
[cell setClickHoldTarget:self];
}
}
// Display the menu.
-- (void)menuAction:(id)sender {
+- (void)attachedMenuAction:(id)sender {
// We shouldn't get here unless the menu is enabled.
- DCHECK(menuEnabled_);
+ DCHECK(attachedMenuEnabled_);
// If we don't have a menu (in which case the person using this control is
// being bad), just wait for a mouse up.
- if (!menu_) {
+ if (!attachedMenu_) {
LOG(WARNING) << "No menu available.";
[NSApp nextEventMatchingMask:NSLeftMouseUpMask
untilDate:[NSDate distantFuture]
@@ -122,7 +122,7 @@
[[NSPopUpButtonCell alloc] initTextCell:@""
pullsDown:YES]);
DCHECK(popUpCell.get());
- [popUpCell setMenu:menu_];
+ [popUpCell setMenu:attachedMenu_];
[popUpCell selectItem:nil];
[popUpCell attachPopUpWithFrame:frame
inView:self];
« no previous file with comments | « chrome/browser/cocoa/delayedmenu_button.h ('k') | chrome/browser/cocoa/delayedmenu_button_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698