diff options
author | mrossetti@chromium.org <mrossetti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-14 18:32:57 +0000 |
---|---|---|
committer | mrossetti@chromium.org <mrossetti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-14 18:32:57 +0000 |
commit | cdf8cf7bf3dc3834f6b18c95123c548a5d5fca08 (patch) | |
tree | 92fcdbbb9fa06057857b34cd35256bc097ff28b6 /chrome/browser/cocoa/bookmark_bar_controller.h | |
parent | e29c77e0d8d63e3374a728bade376c01240820ba (diff) | |
download | chromium_src-cdf8cf7bf3dc3834f6b18c95123c548a5d5fca08.zip chromium_src-cdf8cf7bf3dc3834f6b18c95123c548a5d5fca08.tar.gz chromium_src-cdf8cf7bf3dc3834f6b18c95123c548a5d5fca08.tar.bz2 |
Implement cut and paste and rework copy and delete bookmark actions from context menus. Eliminate bifurcated 'parentController_' data member (leaving this common behavior to the BookmarkFolderTarget class). Provide context menus (one for button and another for folder) for the folder controller thus allowing far easier identification of the target of the action.
BookmarkBar.xib changes: Added Cut and Paste menu items to the button and folder contextual menus. Reconfigured the menus with separators and some rearranging to match Windows.
BookmarkBarFolderWindow.xib changes: Copied the button and folder contextual menus from the BookmarkBar.xib and wired them up to the folder controller instead.
BUG=23541
TEST=Present context menu for bookmark bar and verify the presence of Cut/Copy/Paste/Delete. Verify proper enabling (i.e. Paste should not be enabled until a bookmark or folder has been Cut or Copied). Perform each action Cut, Copy, Delete and Paste. Perform these tests for the contents of a folder coming off of the bookmark bar and for subfolders, too. Insure that pasting can be performed from the bar to a folder, a folder to the bar, bar to bar, folder to folder, at the beginning and at the end of each.
Review URL: http://codereview.chromium.org/1611027
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44505 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/bookmark_bar_controller.h')
-rw-r--r-- | chrome/browser/cocoa/bookmark_bar_controller.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/bookmark_bar_controller.h b/chrome/browser/cocoa/bookmark_bar_controller.h index d7d34d6..d9183b4 100644 --- a/chrome/browser/cocoa/bookmark_bar_controller.h +++ b/chrome/browser/cocoa/bookmark_bar_controller.h @@ -261,6 +261,12 @@ willAnimateFromState:(bookmarks::VisualState)oldState // Import bookmarks from another browser. - (IBAction)importBookmarks:(id)sender; +// Provide a favIcon for a bookmark node. May return nil. +- (NSImage*)favIconForNode:(const BookmarkNode*)node; + +// Provide a contextual menu for a bookmark node. May return nil. +- (NSMenu*)contextMenuForNode:(const BookmarkNode*)node; + // Actions for manipulating bookmarks. // Open a normal bookmark or folder from a button, ... - (IBAction)openBookmark:(id)sender; @@ -272,7 +278,9 @@ willAnimateFromState:(bookmarks::VisualState)oldState - (IBAction)openBookmarkInNewWindow:(id)sender; - (IBAction)openBookmarkInIncognitoWindow:(id)sender; - (IBAction)editBookmark:(id)sender; +- (IBAction)cutBookmark:(id)sender; - (IBAction)copyBookmark:(id)sender; +- (IBAction)pasteBookmark:(id)sender; - (IBAction)deleteBookmark:(id)sender; // From a context menu over the bar, ... - (IBAction)openAllBookmarks:(id)sender; |