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

Unified Diff: chrome/browser/cocoa/menu_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/menu_button.h ('k') | chrome/browser/cocoa/menu_button_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/menu_button.mm
diff --git a/chrome/browser/cocoa/menu_button.mm b/chrome/browser/cocoa/menu_button.mm
index 23d5d0ebdae1ac0aa0053105d8de51dd2eb39af6..bfa31ea1585cdc5e202b438a0fc6b3b68dc178ce 100644
--- a/chrome/browser/cocoa/menu_button.mm
+++ b/chrome/browser/cocoa/menu_button.mm
@@ -45,7 +45,7 @@
// Accessors and mutators:
-@synthesize menu = menu_;
+@synthesize attachedMenu = attachedMenu_;
@end // @implementation MenuButton
@@ -67,7 +67,7 @@
// Actually show the menu (in the correct location). |isDragging| indicates
// whether the mouse button is still down or not.
- (void)showMenu:(BOOL)isDragging {
- if (!menu_) {
+ if (![self attachedMenu]) {
LOG(WARNING) << "No menu available.";
if (isDragging) {
// If we're dragging, wait for mouse up.
@@ -96,7 +96,7 @@
[[NSPopUpButtonCell alloc] initTextCell:@""
pullsDown:YES]);
DCHECK(popUpCell.get());
- [popUpCell setMenu:menu_];
+ [popUpCell setMenu:[self attachedMenu]];
[popUpCell selectItem:nil];
[popUpCell attachPopUpWithFrame:frame
inView:self];
« no previous file with comments | « chrome/browser/cocoa/menu_button.h ('k') | chrome/browser/cocoa/menu_button_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698