OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_FOLDER_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_FOLDER_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_FOLDER_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_FOLDER_CONTROLLER_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #include "base/memory/scoped_nsobject.h" | 10 #include "base/memory/scoped_nsobject.h" |
11 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_button.h" | 11 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_button.h" |
12 #import "chrome/browser/ui/cocoa/tracking_area.h" | 12 #import "ui/base/cocoa/tracking_area.h" |
13 | 13 |
14 @class BookmarkBarController; | 14 @class BookmarkBarController; |
15 @class BookmarkBarFolderView; | 15 @class BookmarkBarFolderView; |
16 @class BookmarkBarFolderHoverState; | 16 @class BookmarkBarFolderHoverState; |
17 @class BookmarkBarFolderWindow; | 17 @class BookmarkBarFolderWindow; |
18 @class BookmarkBarFolderWindowContentView; | 18 @class BookmarkBarFolderWindowContentView; |
19 @class BookmarkFolderTarget; | 19 @class BookmarkFolderTarget; |
20 | 20 |
21 // A controller for the pop-up windows from bookmark folder buttons | 21 // A controller for the pop-up windows from bookmark folder buttons |
22 // which look sort of like menus. | 22 // which look sort of like menus. |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 // Logic for dealing with a click on a bookmark folder button. | 105 // Logic for dealing with a click on a bookmark folder button. |
106 scoped_nsobject<BookmarkFolderTarget> folderTarget_; | 106 scoped_nsobject<BookmarkFolderTarget> folderTarget_; |
107 | 107 |
108 // A controller for a pop-up bookmark folder window (custom menu). | 108 // A controller for a pop-up bookmark folder window (custom menu). |
109 // We (self) are the parentController_ for our folderController_. | 109 // We (self) are the parentController_ for our folderController_. |
110 // This is not a scoped_nsobject because it owns itself (when its | 110 // This is not a scoped_nsobject because it owns itself (when its |
111 // window closes the controller gets autoreleased). | 111 // window closes the controller gets autoreleased). |
112 BookmarkBarFolderController* folderController_; | 112 BookmarkBarFolderController* folderController_; |
113 | 113 |
114 // Implement basic menu scrolling through this tracking area. | 114 // Implement basic menu scrolling through this tracking area. |
115 ScopedCrTrackingArea scrollTrackingArea_; | 115 ui::ScopedCrTrackingArea scrollTrackingArea_; |
116 | 116 |
117 // Timer to continue scrolling as needed. We own the timer but | 117 // Timer to continue scrolling as needed. We own the timer but |
118 // don't release it when done (we invalidate it). | 118 // don't release it when done (we invalidate it). |
119 NSTimer* scrollTimer_; | 119 NSTimer* scrollTimer_; |
120 | 120 |
121 // Precalculated sum of left and right edge padding of buttons in a | 121 // Precalculated sum of left and right edge padding of buttons in a |
122 // folder menu window. This is calculated from the widths of the main | 122 // folder menu window. This is calculated from the widths of the main |
123 // folder menu window and the scroll view within. | 123 // folder menu window and the scroll view within. |
124 CGFloat padding_; | 124 CGFloat padding_; |
125 | 125 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 - (BOOL)canScrollDown; | 199 - (BOOL)canScrollDown; |
200 - (CGFloat)verticalScrollArrowHeight; | 200 - (CGFloat)verticalScrollArrowHeight; |
201 - (NSView*)visibleView; | 201 - (NSView*)visibleView; |
202 - (NSScrollView*)scrollView; | 202 - (NSScrollView*)scrollView; |
203 - (NSView*)folderView; | 203 - (NSView*)folderView; |
204 | 204 |
205 - (BookmarkButton*)buttonForDroppingOnAtPoint:(NSPoint)point; | 205 - (BookmarkButton*)buttonForDroppingOnAtPoint:(NSPoint)point; |
206 @end | 206 @end |
207 | 207 |
208 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_FOLDER_CONTROLLER_H_ | 208 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_FOLDER_CONTROLLER_H_ |
OLD | NEW |