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

Side by Side Diff: chrome/browser/cocoa/bookmark_menu_cocoa_controller.h

Issue 159286: Added menus for bookmark bar folders. (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 // Controller (MVC) for the bookmark menu. 5 // Controller (MVC) for the bookmark menu.
6 // All bookmark menu item commands get directed here. 6 // All bookmark menu item commands get directed here.
7 // Unfortunately there is already a C++ class named BookmarkMenuController. 7 // Unfortunately there is already a C++ class named BookmarkMenuController.
8 8
9 #ifndef CHROME_BROWSER_COCOA_BOOKMARK_MENU_COCOA_CONTROLLER_H_ 9 #ifndef CHROME_BROWSER_COCOA_BOOKMARK_MENU_COCOA_CONTROLLER_H_
10 #define CHROME_BROWSER_COCOA_BOOKMARK_MENU_COCOA_CONTROLLER_H_ 10 #define CHROME_BROWSER_COCOA_BOOKMARK_MENU_COCOA_CONTROLLER_H_
11 11
12 #import <Cocoa/Cocoa.h> 12 #import <Cocoa/Cocoa.h>
13 13
14 class BookmarkNode; 14 class BookmarkNode;
15 class BookmarkMenuBridge; 15 class BookmarkMenuBridge;
16 16
17 @interface BookmarkMenuCocoaController : NSObject { 17 @interface BookmarkMenuCocoaController : NSObject {
18 @private 18 @private
19 BookmarkMenuBridge* bridge_; // weak; owns me 19 BookmarkMenuBridge* bridge_; // weak; owns me
20 } 20 }
21 21
22 // Return an autoreleased string to be used as a menu title for the
23 // given bookmark node.
24 + (NSString*)menuTitleForNode:(const BookmarkNode*)node;
25
22 - (id)initWithBridge:(BookmarkMenuBridge *)bridge; 26 - (id)initWithBridge:(BookmarkMenuBridge *)bridge;
23 27
24 // Called by any Bookmark menu item. 28 // Called by any Bookmark menu item.
25 // The menu item's tag is the bookmark ID. 29 // The menu item's tag is the bookmark ID.
26 - (IBAction)openBookmarkMenuItem:(id)sender; 30 - (IBAction)openBookmarkMenuItem:(id)sender;
27 31
28 @end // BookmarkMenuCocoaController 32 @end // BookmarkMenuCocoaController
29 33
30 34
31 @interface BookmarkMenuCocoaController (ExposedForUnitTests) 35 @interface BookmarkMenuCocoaController (ExposedForUnitTests)
32 - (const BookmarkNode*)nodeForIdentifier:(int)identifier; 36 - (const BookmarkNode*)nodeForIdentifier:(int)identifier;
33 - (void)openURLForNode:(const BookmarkNode*)node; 37 - (void)openURLForNode:(const BookmarkNode*)node;
34 @end // BookmarkMenuCocoaController (ExposedForUnitTests) 38 @end // BookmarkMenuCocoaController (ExposedForUnitTests)
35 39
36 #endif // CHROME_BROWSER_COCOA_BOOKMARK_MENU_COCOA_CONTROLLER_H_ 40 #endif // CHROME_BROWSER_COCOA_BOOKMARK_MENU_COCOA_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/bookmark_menu_bridge.mm ('k') | chrome/browser/cocoa/bookmark_menu_cocoa_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698