| 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 #import "chrome/browser/ui/cocoa/themed_window.h" |
| 9 #include "ui/base/window_open_disposition.h" | 9 #include "ui/base/window_open_disposition.h" |
| 10 | 10 |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 - (void)removeButton:(NSInteger)buttonIndex animate:(BOOL)poof; | 183 - (void)removeButton:(NSInteger)buttonIndex animate:(BOOL)poof; |
| 184 | 184 |
| 185 // Determine the controller containing the button representing |node|, if any. | 185 // Determine the controller containing the button representing |node|, if any. |
| 186 - (id<BookmarkButtonControllerProtocol>)controllerForNode: | 186 - (id<BookmarkButtonControllerProtocol>)controllerForNode: |
| 187 (const bookmarks::BookmarkNode*)node; | 187 (const bookmarks::BookmarkNode*)node; |
| 188 | 188 |
| 189 @end // @protocol BookmarkButtonControllerProtocol | 189 @end // @protocol BookmarkButtonControllerProtocol |
| 190 | 190 |
| 191 | 191 |
| 192 // Class for bookmark bar buttons that can be drag sources. | 192 // Class for bookmark bar buttons that can be drag sources. |
| 193 @interface BookmarkButton | 193 @interface BookmarkButton : DraggableButton<ThemedWindowDrawing> { |
| 194 : DraggableButton<ThemedWindowDrawing, NSDraggingSource> { | |
| 195 @private | 194 @private |
| 196 IBOutlet NSObject<BookmarkButtonDelegate>* delegate_; // Weak. | 195 IBOutlet NSObject<BookmarkButtonDelegate>* delegate_; // Weak. |
| 197 | 196 |
| 198 // 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. |
| 199 // 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 |
| 200 // 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 |
| 201 // 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 |
| 202 // 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 |
| 203 // a drag. | 202 // a drag. |
| 204 BrowserWindowController* visibilityDelegate_; // weak | 203 BrowserWindowController* visibilityDelegate_; // weak |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 + (BookmarkButton*)draggedButton; | 245 + (BookmarkButton*)draggedButton; |
| 247 | 246 |
| 248 | 247 |
| 249 @end // @interface BookmarkButton | 248 @end // @interface BookmarkButton |
| 250 | 249 |
| 251 | 250 |
| 252 @interface BookmarkButton(TestingAPI) | 251 @interface BookmarkButton(TestingAPI) |
| 253 - (void)beginDrag:(NSEvent*)event; | 252 - (void)beginDrag:(NSEvent*)event; |
| 254 @end | 253 @end |
| 255 | 254 |
| OLD | NEW |