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

Side by Side Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.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: Minor typo. 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_BAR_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_COCOA_BOOKMARKS_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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 216
217 IBOutlet BookmarkBarView* buttonView_; // Contains 'no items' text fields. 217 IBOutlet BookmarkBarView* buttonView_; // Contains 'no items' text fields.
218 IBOutlet BookmarkButton* offTheSideButton_; // aka the chevron. 218 IBOutlet BookmarkButton* offTheSideButton_; // aka the chevron.
219 219
220 NSRect originalNoItemsRect_; // Original, pre-resized field rect. 220 NSRect originalNoItemsRect_; // Original, pre-resized field rect.
221 NSRect originalImportBookmarksRect_; // Original, pre-resized field rect. 221 NSRect originalImportBookmarksRect_; // Original, pre-resized field rect.
222 222
223 // "Other bookmarks" button on the right side. 223 // "Other bookmarks" button on the right side.
224 scoped_nsobject<BookmarkButton> otherBookmarksButton_; 224 scoped_nsobject<BookmarkButton> otherBookmarksButton_;
225 225
226 // "Apps" button to the right of "Other bookmarks".
227 scoped_nsobject<BookmarkButton> appsPageShortcutButton_;
228
226 // When doing a drag, this is folder button "hovered over" which we 229 // When doing a drag, this is folder button "hovered over" which we
227 // may want to open after a short delay. There are cases where a 230 // may want to open after a short delay. There are cases where a
228 // mouse-enter can open a folder (e.g. if the menus are "active") 231 // mouse-enter can open a folder (e.g. if the menus are "active")
229 // but that doesn't use this variable or need a delay so "hover" is 232 // but that doesn't use this variable or need a delay so "hover" is
230 // the wrong term. 233 // the wrong term.
231 scoped_nsobject<BookmarkButton> hoverButton_; 234 scoped_nsobject<BookmarkButton> hoverButton_;
232 235
233 // We save the view width when we add bookmark buttons. This lets 236 // We save the view width when we add bookmark buttons. This lets
234 // us avoid a rebuild until we've grown the window bigger than our 237 // us avoid a rebuild until we've grown the window bigger than our
235 // initial build. 238 // initial build.
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 - (BookmarkContextMenuCocoaController*)menuController; 294 - (BookmarkContextMenuCocoaController*)menuController;
292 295
293 // Updates the bookmark bar (from its current, possibly in-transition) state to 296 // Updates the bookmark bar (from its current, possibly in-transition) state to
294 // the new state. 297 // the new state.
295 - (void)updateState:(BookmarkBar::State)newState 298 - (void)updateState:(BookmarkBar::State)newState
296 changeType:(BookmarkBar::AnimateChangeType)changeType; 299 changeType:(BookmarkBar::AnimateChangeType)changeType;
297 300
298 // Update the visible state of the bookmark bar. 301 // Update the visible state of the bookmark bar.
299 - (void)updateVisibility; 302 - (void)updateVisibility;
300 303
304 // Update the visible state of the bookmark bar.
305 - (void)updateAppsPageShortcutButtonVisibility;
306
301 // Hides or shows the bookmark bar depending on the current state. 307 // Hides or shows the bookmark bar depending on the current state.
302 - (void)updateHiddenState; 308 - (void)updateHiddenState;
303 309
304 // Turn on or off the bookmark bar and prevent or reallow its appearance. On 310 // Turn on or off the bookmark bar and prevent or reallow its appearance. On
305 // disable, toggle off if shown. On enable, show only if needed. App and popup 311 // disable, toggle off if shown. On enable, show only if needed. App and popup
306 // windows do not show a bookmark bar. 312 // windows do not show a bookmark bar.
307 - (void)setBookmarkBarEnabled:(BOOL)enabled; 313 - (void)setBookmarkBarEnabled:(BOOL)enabled;
308 314
309 // Returns the amount by which the toolbar above should be compressed. 315 // Returns the amount by which the toolbar above should be compressed.
310 - (CGFloat)getDesiredToolbarHeightCompression; 316 - (CGFloat)getDesiredToolbarHeightCompression;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 - (NSMutableArray*)buttons; 383 - (NSMutableArray*)buttons;
378 - (NSButton*)offTheSideButton; 384 - (NSButton*)offTheSideButton;
379 - (BOOL)offTheSideButtonIsHidden; 385 - (BOOL)offTheSideButtonIsHidden;
380 - (BookmarkButton*)otherBookmarksButton; 386 - (BookmarkButton*)otherBookmarksButton;
381 - (BookmarkBarFolderController*)folderController; 387 - (BookmarkBarFolderController*)folderController;
382 - (id)folderTarget; 388 - (id)folderTarget;
383 - (int)displayedButtonCount; 389 - (int)displayedButtonCount;
384 - (void)openURL:(GURL)url disposition:(WindowOpenDisposition)disposition; 390 - (void)openURL:(GURL)url disposition:(WindowOpenDisposition)disposition;
385 - (void)clearBookmarkBar; 391 - (void)clearBookmarkBar;
386 - (BookmarkButtonCell*)cellForBookmarkNode:(const BookmarkNode*)node; 392 - (BookmarkButtonCell*)cellForBookmarkNode:(const BookmarkNode*)node;
393 - (BookmarkButtonCell*)cellForCustomButtonWithText:(NSString*)text
394 image:(NSImage*)image;
387 - (NSRect)frameForBookmarkButtonFromCell:(NSCell*)cell xOffset:(int*)xOffset; 395 - (NSRect)frameForBookmarkButtonFromCell:(NSCell*)cell xOffset:(int*)xOffset;
388 - (void)checkForBookmarkButtonGrowth:(NSButton*)button; 396 - (void)checkForBookmarkButtonGrowth:(NSButton*)button;
389 - (void)frameDidChange; 397 - (void)frameDidChange;
390 - (int64)nodeIdFromMenuTag:(int32)tag; 398 - (int64)nodeIdFromMenuTag:(int32)tag;
391 - (int32)menuTagFromNodeId:(int64)menuid; 399 - (int32)menuTagFromNodeId:(int64)menuid;
392 - (void)updateTheme:(ui::ThemeProvider*)themeProvider; 400 - (void)updateTheme:(ui::ThemeProvider*)themeProvider;
393 - (BookmarkButton*)buttonForDroppingOnAtPoint:(NSPoint)point; 401 - (BookmarkButton*)buttonForDroppingOnAtPoint:(NSPoint)point;
394 - (BOOL)isEventAnExitEvent:(NSEvent*)event; 402 - (BOOL)isEventAnExitEvent:(NSEvent*)event;
395 - (BOOL)shrinkOrHideView:(NSView*)view forMaxX:(CGFloat)maxViewX; 403 - (BOOL)shrinkOrHideView:(NSView*)view forMaxX:(CGFloat)maxViewX;
396 - (void)unhighlightBookmark:(const BookmarkNode*)node; 404 - (void)unhighlightBookmark:(const BookmarkNode*)node;
397 405
398 // The following are for testing purposes only and are not used internally. 406 // The following are for testing purposes only and are not used internally.
399 - (NSMenu *)menuForFolderNode:(const BookmarkNode*)node; 407 - (NSMenu *)menuForFolderNode:(const BookmarkNode*)node;
400 @end 408 @end
401 409
402 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_CONTROLLER_H_ 410 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698