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

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

Issue 155358: More bookmark bar changes.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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/bookmark_bar_view.h ('k') | chrome/browser/cocoa/bookmark_bar_view_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/bookmark_bar_view.mm
===================================================================
--- chrome/browser/cocoa/bookmark_bar_view.mm (revision 20588)
+++ chrome/browser/cocoa/bookmark_bar_view.mm (working copy)
@@ -5,4 +5,18 @@
#include "chrome/browser/cocoa/bookmark_bar_view.h"
@implementation BookmarkBarView
+
+// Only hit in a unit test.
+- (void)setContextMenu:(NSMenu*)menu {
+ barContextualMenu_ = menu;
+}
+
+// Unlike controls, generic views don't have a well-defined context
+// menu (e.g. responds to the "menu" selector). So we add our own.
+- (NSMenu *)menuForEvent:(NSEvent *)event {
+ if ([event type] == NSRightMouseDown)
+ return barContextualMenu_;
+ return nil;
+}
+
@end
« no previous file with comments | « chrome/browser/cocoa/bookmark_bar_view.h ('k') | chrome/browser/cocoa/bookmark_bar_view_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698