| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #import <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
| 6 | 6 |
| 7 #include "base/scoped_nsobject.h" | 7 #include "base/scoped_nsobject.h" |
| 8 #import "chrome/browser/cocoa/bookmark_button.h" | 8 #import "chrome/browser/cocoa/bookmark_button.h" |
| 9 | 9 |
| 10 @class BookmarkBarController; | 10 @class BookmarkBarController; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 // The scroll view that contains our main button view (below). | 60 // The scroll view that contains our main button view (below). |
| 61 IBOutlet NSScrollView* scrollView_; | 61 IBOutlet NSScrollView* scrollView_; |
| 62 | 62 |
| 63 // Are we scrollable? If no, the full contents of the folder are | 63 // Are we scrollable? If no, the full contents of the folder are |
| 64 // always visible. | 64 // always visible. |
| 65 BOOL scrollable_; | 65 BOOL scrollable_; |
| 66 | 66 |
| 67 BOOL scrollUpArrowShown_; | 67 BOOL scrollUpArrowShown_; |
| 68 BOOL scrollDownArrowShown_; | 68 BOOL scrollDownArrowShown_; |
| 69 | 69 |
| 70 // YES if subfolders should grow to the right (the default). |
| 71 // Direction switches if we'd grow off the screen. |
| 72 BOOL subFolderGrowthToRight_; |
| 73 |
| 70 // The main view of this window (where the buttons go). | 74 // The main view of this window (where the buttons go). |
| 71 IBOutlet BookmarkBarFolderView* mainView_; | 75 IBOutlet BookmarkBarFolderView* mainView_; |
| 72 | 76 |
| 73 // Weak; we keep track to work around a | 77 // Weak; we keep track to work around a |
| 74 // setShowsBorderOnlyWhileMouseInside bug. | 78 // setShowsBorderOnlyWhileMouseInside bug. |
| 75 BookmarkButton* buttonThatMouseIsIn_; | 79 BookmarkButton* buttonThatMouseIsIn_; |
| 76 | 80 |
| 77 // The context menu for a bookmark button which represents an URL. | 81 // The context menu for a bookmark button which represents an URL. |
| 78 IBOutlet NSMenu* buttonMenu_; | 82 IBOutlet NSMenu* buttonMenu_; |
| 79 | 83 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 - (IBAction)addPage:(id)sender; | 149 - (IBAction)addPage:(id)sender; |
| 146 - (IBAction)editBookmark:(id)sender; | 150 - (IBAction)editBookmark:(id)sender; |
| 147 - (IBAction)openBookmark:(id)sender; | 151 - (IBAction)openBookmark:(id)sender; |
| 148 - (IBAction)openAllBookmarks:(id)sender; | 152 - (IBAction)openAllBookmarks:(id)sender; |
| 149 - (IBAction)openAllBookmarksIncognitoWindow:(id)sender; | 153 - (IBAction)openAllBookmarksIncognitoWindow:(id)sender; |
| 150 - (IBAction)openAllBookmarksNewWindow:(id)sender; | 154 - (IBAction)openAllBookmarksNewWindow:(id)sender; |
| 151 - (IBAction)openBookmarkInIncognitoWindow:(id)sender; | 155 - (IBAction)openBookmarkInIncognitoWindow:(id)sender; |
| 152 - (IBAction)openBookmarkInNewForegroundTab:(id)sender; | 156 - (IBAction)openBookmarkInNewForegroundTab:(id)sender; |
| 153 - (IBAction)openBookmarkInNewWindow:(id)sender; | 157 - (IBAction)openBookmarkInNewWindow:(id)sender; |
| 154 | 158 |
| 159 @property (assign, nonatomic) BOOL subFolderGrowthToRight; |
| 160 |
| 155 @end | 161 @end |
| 156 | 162 |
| 157 @interface BookmarkBarFolderController(TestingAPI) | 163 @interface BookmarkBarFolderController(TestingAPI) |
| 158 - (NSView*)mainView; | 164 - (NSView*)mainView; |
| 159 - (NSPoint)windowTopLeft; | 165 - (NSPoint)windowTopLeftForWidth:(int)windowWidth; |
| 160 - (NSArray*)buttons; | 166 - (NSArray*)buttons; |
| 161 - (BookmarkBarFolderController*)folderController; | 167 - (BookmarkBarFolderController*)folderController; |
| 162 - (id)folderTarget; | 168 - (id)folderTarget; |
| 163 - (void)configureWindowLevel; | 169 - (void)configureWindowLevel; |
| 164 - (void)performOneScroll:(CGFloat)delta; | 170 - (void)performOneScroll:(CGFloat)delta; |
| 165 // Set to YES in order to prevent animations. | 171 // Set to YES in order to prevent animations. |
| 166 - (void)setIgnoreAnimations:(BOOL)ignore; | 172 - (void)setIgnoreAnimations:(BOOL)ignore; |
| 167 | 173 |
| 168 // Return YES if we can scroll up or down. | 174 // Return YES if we can scroll up or down. |
| 169 - (BOOL)canScrollUp; | 175 - (BOOL)canScrollUp; |
| 170 - (BOOL)canScrollDown; | 176 - (BOOL)canScrollDown; |
| 171 // Return YES if the scrollable_ flag has been set. | 177 // Return YES if the scrollable_ flag has been set. |
| 172 - (BOOL)scrollable; | 178 - (BOOL)scrollable; |
| 173 | 179 |
| 174 - (BookmarkButton*)buttonForDroppingOnAtPoint:(NSPoint)point; | 180 - (BookmarkButton*)buttonForDroppingOnAtPoint:(NSPoint)point; |
| 175 @end | 181 @end |
| 176 | 182 |
| OLD | NEW |