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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/cocoa/bookmark_bar_view.h" 5 #include "chrome/browser/cocoa/bookmark_bar_view.h"
6 6
7 @implementation BookmarkBarView 7 @implementation BookmarkBarView
8
9 // Only hit in a unit test.
10 - (void)setContextMenu:(NSMenu*)menu {
11 barContextualMenu_ = menu;
12 }
13
14 // Unlike controls, generic views don't have a well-defined context
15 // menu (e.g. responds to the "menu" selector). So we add our own.
16 - (NSMenu *)menuForEvent:(NSEvent *)event {
17 if ([event type] == NSRightMouseDown)
18 return barContextualMenu_;
19 return nil;
20 }
21
8 @end 22 @end
OLDNEW
« 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