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 #import <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
6 #include <vector> | 6 #include <vector> |
7 #import "chrome/browser/ui/cocoa/draggable_button.h" | 7 #import "chrome/browser/ui/cocoa/draggable_button.h" |
| 8 #import "chrome/browser/ui/cocoa/themed_window.h" |
8 #include "ui/base/window_open_disposition.h" | 9 #include "ui/base/window_open_disposition.h" |
9 | 10 |
10 @class BookmarkBarFolderController; | 11 @class BookmarkBarFolderController; |
11 @class BookmarkButton; | 12 @class BookmarkButton; |
12 class BookmarkNode; | 13 class BookmarkNode; |
13 @class BrowserWindowController; | 14 @class BrowserWindowController; |
14 class ThemeService; | 15 class ThemeService; |
15 | 16 |
16 namespace bookmarks { | 17 namespace bookmarks { |
17 class BookmarkModel; | 18 class BookmarkModel; |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 - (void)removeButton:(NSInteger)buttonIndex animate:(BOOL)poof; | 183 - (void)removeButton:(NSInteger)buttonIndex animate:(BOOL)poof; |
183 | 184 |
184 // Determine the controller containing the button representing |node|, if any. | 185 // Determine the controller containing the button representing |node|, if any. |
185 - (id<BookmarkButtonControllerProtocol>)controllerForNode: | 186 - (id<BookmarkButtonControllerProtocol>)controllerForNode: |
186 (const BookmarkNode*)node; | 187 (const BookmarkNode*)node; |
187 | 188 |
188 @end // @protocol BookmarkButtonControllerProtocol | 189 @end // @protocol BookmarkButtonControllerProtocol |
189 | 190 |
190 | 191 |
191 // Class for bookmark bar buttons that can be drag sources. | 192 // Class for bookmark bar buttons that can be drag sources. |
192 @interface BookmarkButton : DraggableButton { | 193 @interface BookmarkButton : DraggableButton<ThemedWindowDrawing> { |
193 @private | 194 @private |
194 IBOutlet NSObject<BookmarkButtonDelegate>* delegate_; // Weak. | 195 IBOutlet NSObject<BookmarkButtonDelegate>* delegate_; // Weak. |
195 | 196 |
196 // Saved pointer to the BWC for the browser window that contains this button. | 197 // Saved pointer to the BWC for the browser window that contains this button. |
197 // Used to lock and release bar visibility during a drag. The pointer is | 198 // Used to lock and release bar visibility during a drag. The pointer is |
198 // saved because the bookmark button is no longer a part of a window at the | 199 // saved because the bookmark button is no longer a part of a window at the |
199 // end of a drag operation (or, in fact, can be dragged to a completely | 200 // end of a drag operation (or, in fact, can be dragged to a completely |
200 // different window), so there is no way to retrieve the same BWC object after | 201 // different window), so there is no way to retrieve the same BWC object after |
201 // a drag. | 202 // a drag. |
202 BrowserWindowController* visibilityDelegate_; // weak | 203 BrowserWindowController* visibilityDelegate_; // weak |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 | 259 |
259 // Key for userInfo dict of a kPulseBookmarkButtonNotification. | 260 // Key for userInfo dict of a kPulseBookmarkButtonNotification. |
260 // Value is a [NSValue valueWithPointer:]; pointer is a (const BookmarkNode*). | 261 // Value is a [NSValue valueWithPointer:]; pointer is a (const BookmarkNode*). |
261 extern NSString* const kBookmarkKey; | 262 extern NSString* const kBookmarkKey; |
262 | 263 |
263 // Key for userInfo dict of a kPulseBookmarkButtonNotification. | 264 // Key for userInfo dict of a kPulseBookmarkButtonNotification. |
264 // Value is a [NSNumber numberWithBool:] to turn pulsing on or off. | 265 // Value is a [NSNumber numberWithBool:] to turn pulsing on or off. |
265 extern NSString* const kBookmarkPulseFlagKey; | 266 extern NSString* const kBookmarkPulseFlagKey; |
266 | 267 |
267 }; | 268 }; |
OLD | NEW |