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

Side by Side Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.h

Issue 12550006: Mac: Add a shortcut to open the Apps page from the bookmark bar. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 9 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_BUTTON_CELL_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BUTTON_CELL_H_
6 #define CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BUTTON_CELL_H_ 6 #define CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BUTTON_CELL_H_
7 7
8 #import "chrome/browser/ui/cocoa/gradient_button_cell.h" 8 #import "chrome/browser/ui/cocoa/gradient_button_cell.h"
9 9
10 @class BookmarkContextMenuCocoaController; 10 @class BookmarkContextMenuCocoaController;
(...skipping 25 matching lines...) Expand all
36 scoped_nsobject<NSColor> textColor_; 36 scoped_nsobject<NSColor> textColor_;
37 } 37 }
38 38
39 @property(nonatomic, readwrite, assign) const BookmarkNode* bookmarkNode; 39 @property(nonatomic, readwrite, assign) const BookmarkNode* bookmarkNode;
40 @property(nonatomic, readwrite, assign) int startingChildIndex; 40 @property(nonatomic, readwrite, assign) int startingChildIndex;
41 @property(nonatomic, readwrite, assign) BOOL drawFolderArrow; 41 @property(nonatomic, readwrite, assign) BOOL drawFolderArrow;
42 42
43 // Create a button cell which draws with a theme. 43 // Create a button cell which draws with a theme.
44 + (id)buttonCellForNode:(const BookmarkNode*)node 44 + (id)buttonCellForNode:(const BookmarkNode*)node
45 menuController:(BookmarkContextMenuCocoaController*)menuController 45 menuController:(BookmarkContextMenuCocoaController*)menuController
46 cellText:(NSString*)cellText 46 text:(NSString*)text
47 cellImage:(NSImage*)cellImage; 47 image:(NSImage*)image;
48
49 // Create a button cell not attached to any node which draws with a theme.
50 + (id)buttonCellWithMenuController:
51 (BookmarkContextMenuCocoaController*)menuController
52 text:(NSString*)text
53 image:(NSImage*)image;
48 54
49 // Initialize a button cell which draws with a theme. 55 // Initialize a button cell which draws with a theme.
50 // Designated initializer. 56 // Designated initializer.
51 - (id)initForNode:(const BookmarkNode*)node 57 - (id)initForNode:(const BookmarkNode*)node
52 menuController:(BookmarkContextMenuCocoaController*)menuController 58 menuController:(BookmarkContextMenuCocoaController*)menuController
53 cellText:(NSString*)cellText 59 text:(NSString*)text
54 cellImage:(NSImage*)cellImage; 60 image:(NSImage*)image;
55 61
56 - (BOOL)empty; // returns YES if empty. 62 // Initialize a button cell not attached to any node which draws with a theme.
63 - (id)initWithMenuController:
Alexei Svitkine (slow) 2013/03/11 14:31:04 As discussed on a previous patchset, we wanted |te
beaudoin 2013/03/11 21:02:14 Done.
64 (BookmarkContextMenuCocoaController*)menuController
65 text:(NSString*)text
66 image:(NSImage*)image;
67
68 // A button cell is considered empty if it is expected to be attached to a node
69 // and this node is NULL. If the button was created with
70 // buttonCellForContextMenu then no node is expected and empty is always NO.
71 - (BOOL)empty;
57 - (void)setEmpty:(BOOL)empty; 72 - (void)setEmpty:(BOOL)empty;
58 73
59 // |-setBookmarkCellText:image:| is used to set the text and image of 74 // |-setBookmarkCellText:image:| is used to set the text and image of
60 // a BookmarkButtonCell, and align the image to the left (NSImageLeft) 75 // a BookmarkButtonCell, and align the image to the left (NSImageLeft)
61 // if there is text in the title, and centered (NSImageCenter) if 76 // if there is text in the title, and centered (NSImageCenter) if
62 // there is not. If |title| is nil, do not reset the title. 77 // there is not. If |title| is nil, do not reset the title.
63 - (void)setBookmarkCellText:(NSString*)title 78 - (void)setBookmarkCellText:(NSString*)title
64 image:(NSImage*)image; 79 image:(NSImage*)image;
65 80
66 // Set the color of text in this cell. 81 // Set the color of text in this cell.
67 - (void)setTextColor:(NSColor*)color; 82 - (void)setTextColor:(NSColor*)color;
68 83
69 - (BOOL)isFolderButtonCell; 84 - (BOOL)isFolderButtonCell;
70 85
71 @end 86 @end
72 87
73 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BUTTON_CELL_H_ 88 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BUTTON_CELL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698