| OLD | NEW |
| 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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 IBOutlet BookmarkBarView* buttonView_; // Contains 'no items' text fields. | 219 IBOutlet BookmarkBarView* buttonView_; // Contains 'no items' text fields. |
| 220 IBOutlet BookmarkButton* offTheSideButton_; // aka the chevron. | 220 IBOutlet BookmarkButton* offTheSideButton_; // aka the chevron. |
| 221 IBOutlet NSMenu* buttonContextMenu_; | 221 IBOutlet NSMenu* buttonContextMenu_; |
| 222 | 222 |
| 223 NSRect originalNoItemsRect_; // Original, pre-resized field rect. | 223 NSRect originalNoItemsRect_; // Original, pre-resized field rect. |
| 224 NSRect originalImportBookmarksRect_; // Original, pre-resized field rect. | 224 NSRect originalImportBookmarksRect_; // Original, pre-resized field rect. |
| 225 | 225 |
| 226 // "Other bookmarks" button on the right side. | 226 // "Other bookmarks" button on the right side. |
| 227 scoped_nsobject<BookmarkButton> otherBookmarksButton_; | 227 scoped_nsobject<BookmarkButton> otherBookmarksButton_; |
| 228 | 228 |
| 229 // "Apps" button to the right of "Other bookmarks". |
| 230 scoped_nsobject<BookmarkButton> appsPageShortcutButton_; |
| 231 |
| 229 // We have a special menu for folder buttons. This starts as a copy | 232 // We have a special menu for folder buttons. This starts as a copy |
| 230 // of the bar menu. | 233 // of the bar menu. |
| 231 scoped_nsobject<BookmarkMenu> buttonFolderContextMenu_; | 234 scoped_nsobject<BookmarkMenu> buttonFolderContextMenu_; |
| 232 | 235 |
| 233 // When doing a drag, this is folder button "hovered over" which we | 236 // When doing a drag, this is folder button "hovered over" which we |
| 234 // may want to open after a short delay. There are cases where a | 237 // may want to open after a short delay. There are cases where a |
| 235 // mouse-enter can open a folder (e.g. if the menus are "active") | 238 // mouse-enter can open a folder (e.g. if the menus are "active") |
| 236 // but that doesn't use this variable or need a delay so "hover" is | 239 // but that doesn't use this variable or need a delay so "hover" is |
| 237 // the wrong term. | 240 // the wrong term. |
| 238 scoped_nsobject<BookmarkButton> hoverButton_; | 241 scoped_nsobject<BookmarkButton> hoverButton_; |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 resizeDelegate:(id<ViewResizer>)resizeDelegate; | 292 resizeDelegate:(id<ViewResizer>)resizeDelegate; |
| 290 | 293 |
| 291 // Updates the bookmark bar (from its current, possibly in-transition) state to | 294 // Updates the bookmark bar (from its current, possibly in-transition) state to |
| 292 // the new state. | 295 // the new state. |
| 293 - (void)updateState:(BookmarkBar::State)newState | 296 - (void)updateState:(BookmarkBar::State)newState |
| 294 changeType:(BookmarkBar::AnimateChangeType)changeType; | 297 changeType:(BookmarkBar::AnimateChangeType)changeType; |
| 295 | 298 |
| 296 // Update the visible state of the bookmark bar. | 299 // Update the visible state of the bookmark bar. |
| 297 - (void)updateVisibility; | 300 - (void)updateVisibility; |
| 298 | 301 |
| 302 // Update the visible state of the bookmark bar. |
| 303 - (void)updateAppsPageShortcutButtonVisibility; |
| 304 |
| 299 // Hides or shows the bookmark bar depending on the current state. | 305 // Hides or shows the bookmark bar depending on the current state. |
| 300 - (void)updateHiddenState; | 306 - (void)updateHiddenState; |
| 301 | 307 |
| 302 // Turn on or off the bookmark bar and prevent or reallow its appearance. On | 308 // Turn on or off the bookmark bar and prevent or reallow its appearance. On |
| 303 // disable, toggle off if shown. On enable, show only if needed. App and popup | 309 // disable, toggle off if shown. On enable, show only if needed. App and popup |
| 304 // windows do not show a bookmark bar. | 310 // windows do not show a bookmark bar. |
| 305 - (void)setBookmarkBarEnabled:(BOOL)enabled; | 311 - (void)setBookmarkBarEnabled:(BOOL)enabled; |
| 306 | 312 |
| 307 // Returns the amount by which the toolbar above should be compressed. | 313 // Returns the amount by which the toolbar above should be compressed. |
| 308 - (CGFloat)getDesiredToolbarHeightCompression; | 314 - (CGFloat)getDesiredToolbarHeightCompression; |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 - (BOOL)shrinkOrHideView:(NSView*)view forMaxX:(CGFloat)maxViewX; | 417 - (BOOL)shrinkOrHideView:(NSView*)view forMaxX:(CGFloat)maxViewX; |
| 412 - (void)unhighlightBookmark:(const BookmarkNode*)node; | 418 - (void)unhighlightBookmark:(const BookmarkNode*)node; |
| 413 | 419 |
| 414 // The following are for testing purposes only and are not used internally. | 420 // The following are for testing purposes only and are not used internally. |
| 415 - (NSMenu *)menuForFolderNode:(const BookmarkNode*)node; | 421 - (NSMenu *)menuForFolderNode:(const BookmarkNode*)node; |
| 416 - (NSMenu*)buttonContextMenu; | 422 - (NSMenu*)buttonContextMenu; |
| 417 - (void)setButtonContextMenu:(id)menu; | 423 - (void)setButtonContextMenu:(id)menu; |
| 418 @end | 424 @end |
| 419 | 425 |
| 420 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_CONTROLLER_H_ | 426 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_CONTROLLER_H_ |
| OLD | NEW |