| 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 <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 BOOL isAnimationRunning_; | 176 BOOL isAnimationRunning_; |
| 177 | 177 |
| 178 Browser* browser_; // weak; owned by its window | 178 Browser* browser_; // weak; owned by its window |
| 179 bookmarks::BookmarkModel* bookmarkModel_; // weak; part of the profile owned | 179 bookmarks::BookmarkModel* bookmarkModel_; // weak; part of the profile owned |
| 180 // by the top-level Browser object. | 180 // by the top-level Browser object. |
| 181 bookmarks::ManagedBookmarkService* managedBookmarkService_; | 181 bookmarks::ManagedBookmarkService* managedBookmarkService_; |
| 182 | 182 |
| 183 // Our initial view width, which is applied in awakeFromNib. | 183 // Our initial view width, which is applied in awakeFromNib. |
| 184 CGFloat initialWidth_; | 184 CGFloat initialWidth_; |
| 185 | 185 |
| 186 // BookmarkNodes have a 64bit id. NSMenuItems have a 32bit tag used | |
| 187 // to represent the bookmark node they refer to. This map provides | |
| 188 // a mapping from one to the other, so we can properly identify the | |
| 189 // node from the item. When adding items in, we start with seedId_. | |
| 190 int32_t seedId_; | |
| 191 std::map<int32_t, int64_t> menuTagMap_; | |
| 192 | |
| 193 // Our bookmark buttons, ordered from L-->R. | 186 // Our bookmark buttons, ordered from L-->R. |
| 194 base::scoped_nsobject<NSMutableArray> buttons_; | 187 base::scoped_nsobject<NSMutableArray> buttons_; |
| 195 | 188 |
| 196 // The folder image so we can use one copy for all buttons | 189 // The folder image so we can use one copy for all buttons |
| 197 base::scoped_nsobject<NSImage> folderImage_; | 190 base::scoped_nsobject<NSImage> folderImage_; |
| 198 | 191 |
| 199 // The Material Design Incognito folder image so we can use one copy for all | 192 // The Material Design Incognito folder image so we can use one copy for all |
| 200 // buttons | 193 // buttons |
| 201 base::scoped_nsobject<NSImage> folderImageWhite_; | 194 base::scoped_nsobject<NSImage> folderImageWhite_; |
| 202 | 195 |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 - (id)folderTarget; | 438 - (id)folderTarget; |
| 446 - (int)displayedButtonCount; | 439 - (int)displayedButtonCount; |
| 447 - (void)openURL:(GURL)url disposition:(WindowOpenDisposition)disposition; | 440 - (void)openURL:(GURL)url disposition:(WindowOpenDisposition)disposition; |
| 448 - (void)clearBookmarkBar; | 441 - (void)clearBookmarkBar; |
| 449 - (BookmarkButtonCell*)cellForBookmarkNode:(const bookmarks::BookmarkNode*)node; | 442 - (BookmarkButtonCell*)cellForBookmarkNode:(const bookmarks::BookmarkNode*)node; |
| 450 - (BookmarkButtonCell*)cellForCustomButtonWithText:(NSString*)text | 443 - (BookmarkButtonCell*)cellForCustomButtonWithText:(NSString*)text |
| 451 image:(NSImage*)image; | 444 image:(NSImage*)image; |
| 452 - (NSRect)frameForBookmarkButtonFromCell:(NSCell*)cell xOffset:(int*)xOffset; | 445 - (NSRect)frameForBookmarkButtonFromCell:(NSCell*)cell xOffset:(int*)xOffset; |
| 453 - (void)checkForBookmarkButtonGrowth:(NSButton*)button; | 446 - (void)checkForBookmarkButtonGrowth:(NSButton*)button; |
| 454 - (void)frameDidChange; | 447 - (void)frameDidChange; |
| 455 - (int64_t)nodeIdFromMenuTag:(int32_t)tag; | |
| 456 - (int32_t)menuTagFromNodeId:(int64_t)menuid; | |
| 457 - (void)updateTheme:(const ui::ThemeProvider*)themeProvider; | 448 - (void)updateTheme:(const ui::ThemeProvider*)themeProvider; |
| 458 - (BookmarkButton*)buttonForDroppingOnAtPoint:(NSPoint)point; | 449 - (BookmarkButton*)buttonForDroppingOnAtPoint:(NSPoint)point; |
| 459 - (BOOL)isEventAnExitEvent:(NSEvent*)event; | 450 - (BOOL)isEventAnExitEvent:(NSEvent*)event; |
| 460 - (BOOL)shrinkOrHideView:(NSView*)view forMaxX:(CGFloat)maxViewX; | 451 - (BOOL)shrinkOrHideView:(NSView*)view forMaxX:(CGFloat)maxViewX; |
| 461 - (void)unhighlightBookmark:(const bookmarks::BookmarkNode*)node; | 452 - (void)unhighlightBookmark:(const bookmarks::BookmarkNode*)node; |
| 462 | 453 |
| 463 @end | 454 @end |
| 464 | 455 |
| 465 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_CONTROLLER_H_ | 456 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_CONTROLLER_H_ |
| OLD | NEW |