OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #ifndef CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_CONTEXT_MENU_COCOA_CONTROLLER
_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_CONTEXT_MENU_COCOA_CONTROLLER
_H_ |
6 #define CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_CONTEXT_MENU_COCOA_CONTROLLER
_H_ | 6 #define CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_CONTEXT_MENU_COCOA_CONTROLLER
_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 base::scoped_nsobject<MenuController> menuController_; | 44 base::scoped_nsobject<MenuController> menuController_; |
45 } | 45 } |
46 | 46 |
47 // Initializes the BookmarkContextMenuCocoaController for the given bookmark | 47 // Initializes the BookmarkContextMenuCocoaController for the given bookmark |
48 // bar |controller|. | 48 // bar |controller|. |
49 - (id)initWithBookmarkBarController:(BookmarkBarController*)controller; | 49 - (id)initWithBookmarkBarController:(BookmarkBarController*)controller; |
50 | 50 |
51 // Returns an NSMenu customized for |node|. Works under the assumption that | 51 // Returns an NSMenu customized for |node|. Works under the assumption that |
52 // only one menu should ever be shown at a time, and thus caches the last | 52 // only one menu should ever be shown at a time, and thus caches the last |
53 // returned menu and re-creates it if a menu for a different node is requested. | 53 // returned menu and re-creates it if a menu for a different node is requested. |
54 // Passing in a NULL |node| will return the menu for the bookmark bar itself. | 54 // Passing in a NULL |node| will return the menu for "empty" placeholder. |
55 - (NSMenu*)menuForBookmarkNode:(const BookmarkNode*)node; | 55 - (NSMenu*)menuForBookmarkNode:(const BookmarkNode*)node; |
56 | 56 |
| 57 // Returns an NSMenu customized for the bookmark bar. |
| 58 - (NSMenu*)menuForBookmarkBar; |
| 59 |
57 // Closes the menu, if it's currently open. | 60 // Closes the menu, if it's currently open. |
58 - (void)cancelTracking; | 61 - (void)cancelTracking; |
59 | 62 |
60 @end | 63 @end |
61 | 64 |
62 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_CONTEXT_MENU_COCOA_CONTROL
LER_H_ | 65 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_CONTEXT_MENU_COCOA_CONTROL
LER_H_ |
OLD | NEW |