| 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
|
|
|