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

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

Issue 216052: Mac: Empty bookmark bar should show IDS_BOOKMARKS_NO_ITEMS. (Closed)
Patch Set: Committed ver. Created 11 years, 3 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
« no previous file with comments | « chrome/app/nibs/BookmarkBar.xib ('k') | chrome/browser/cocoa/bookmark_bar_controller.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CHROME_BROWSER_COCOA_BOOKMARK_BAR_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_COCOA_BOOKMARK_BAR_CONTROLLER_H_
6 #define CHROME_BROWSER_COCOA_BOOKMARK_BAR_CONTROLLER_H_ 6 #define CHROME_BROWSER_COCOA_BOOKMARK_BAR_CONTROLLER_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 #include <map> 9 #include <map>
10 10
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 // Bridge from Chrome-style C++ notifications (e.g. derived from 61 // Bridge from Chrome-style C++ notifications (e.g. derived from
62 // BookmarkModelObserver) 62 // BookmarkModelObserver)
63 scoped_ptr<BookmarkBarBridge> bridge_; 63 scoped_ptr<BookmarkBarBridge> bridge_;
64 64
65 // Delegate that can resize us. 65 // Delegate that can resize us.
66 id<ViewResizer> resizeDelegate_; // weak 66 id<ViewResizer> resizeDelegate_; // weak
67 67
68 // Delegate that can open URLs for us. 68 // Delegate that can open URLs for us.
69 id<BookmarkURLOpener> urlDelegate_; // weak 69 id<BookmarkURLOpener> urlDelegate_; // weak
70 70
71 IBOutlet NSView* buttonView_; 71 IBOutlet BookmarkBarView* buttonView_;
72 IBOutlet MenuButton* offTheSideButton_; 72 IBOutlet MenuButton* offTheSideButton_;
73 IBOutlet NSMenu* buttonContextMenu_; 73 IBOutlet NSMenu* buttonContextMenu_;
74 } 74 }
75 75
76 // Initializes the bookmark bar controller with the given browser 76 // Initializes the bookmark bar controller with the given browser
77 // profile and delegates. 77 // profile and delegates.
78 - (id)initWithProfile:(Profile*)profile 78 - (id)initWithProfile:(Profile*)profile
79 initialWidth:(float)initialWidth 79 initialWidth:(float)initialWidth
80 resizeDelegate:(id<ViewResizer>)resizeDelegate 80 resizeDelegate:(id<ViewResizer>)resizeDelegate
81 urlDelegate:(id<BookmarkURLOpener>)urlDelegate; 81 urlDelegate:(id<BookmarkURLOpener>)urlDelegate;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 - (void)nodeChildrenReordered:(BookmarkModel*)model 132 - (void)nodeChildrenReordered:(BookmarkModel*)model
133 node:(const BookmarkNode*)node; 133 node:(const BookmarkNode*)node;
134 @end 134 @end
135 135
136 136
137 // These APIs should only be used by unit tests (or used internally). 137 // These APIs should only be used by unit tests (or used internally).
138 @interface BookmarkBarController(InternalOrTestingAPI) 138 @interface BookmarkBarController(InternalOrTestingAPI)
139 // Set the delegate for a unit test. 139 // Set the delegate for a unit test.
140 - (void)setUrlDelegate:(id<BookmarkURLOpener>)urlDelegate; 140 - (void)setUrlDelegate:(id<BookmarkURLOpener>)urlDelegate;
141 - (void)clearBookmarkBar; 141 - (void)clearBookmarkBar;
142 - (NSView*)buttonView; 142 - (BookmarkBarView*)buttonView;
143 - (NSArray*)buttons; 143 - (NSArray*)buttons;
144 - (NSRect)frameForBookmarkButtonFromCell:(NSCell*)cell xOffset:(int*)xOffset; 144 - (NSRect)frameForBookmarkButtonFromCell:(NSCell*)cell xOffset:(int*)xOffset;
145 - (void)checkForBookmarkButtonGrowth:(NSButton*)button; 145 - (void)checkForBookmarkButtonGrowth:(NSButton*)button;
146 - (void)frameDidChange; 146 - (void)frameDidChange;
147 - (BOOL)offTheSideButtonIsHidden; 147 - (BOOL)offTheSideButtonIsHidden;
148 - (NSMenu *)menuForFolderNode:(const BookmarkNode*)node; 148 - (NSMenu *)menuForFolderNode:(const BookmarkNode*)node;
149 - (int64)nodeIdFromMenuTag:(int32)tag; 149 - (int64)nodeIdFromMenuTag:(int32)tag;
150 - (int32)menuTagFromNodeId:(int64)menuid; 150 - (int32)menuTagFromNodeId:(int64)menuid;
151 - (void)buildOffTheSideMenu; 151 - (void)buildOffTheSideMenu;
152 - (NSMenu*)offTheSideMenu; 152 - (NSMenu*)offTheSideMenu;
153 @end 153 @end
154 154
155 #endif // CHROME_BROWSER_COCOA_BOOKMARK_BAR_CONTROLLER_H_ 155 #endif // CHROME_BROWSER_COCOA_BOOKMARK_BAR_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/app/nibs/BookmarkBar.xib ('k') | chrome/browser/cocoa/bookmark_bar_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698