summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/bookmark_bar_view.mm
blob: 9bdab26b4c41998697e5fc510d2fc07561f9701b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#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