| 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 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.h" | 5 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/mac/bundle_locations.h" | 9 #include "base/mac/bundle_locations.h" |
| 10 #include "base/mac/sdk_forward_declarations.h" | 10 #include "base/mac/sdk_forward_declarations.h" |
| (...skipping 1315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1326 [NSObject cancelPreviousPerformRequestsWithTarget:self]; | 1326 [NSObject cancelPreviousPerformRequestsWithTarget:self]; |
| 1327 | 1327 |
| 1328 [self endScroll]; // Just in case we were scrolling. | 1328 [self endScroll]; // Just in case we were scrolling. |
| 1329 [barController_ childFolderWillClose:self]; | 1329 [barController_ childFolderWillClose:self]; |
| 1330 [self closeBookmarkFolder:self]; | 1330 [self closeBookmarkFolder:self]; |
| 1331 [self autorelease]; | 1331 [self autorelease]; |
| 1332 } | 1332 } |
| 1333 | 1333 |
| 1334 #pragma mark BookmarkButtonDelegate Protocol | 1334 #pragma mark BookmarkButtonDelegate Protocol |
| 1335 | 1335 |
| 1336 - (void)fillPasteboard:(NSPasteboard*)pboard | 1336 - (NSPasteboardItem*)pasteboardItemForDragOfButton:(BookmarkButton*)button { |
| 1337 forDragOfButton:(BookmarkButton*)button { | 1337 return [[self folderTarget] pasteboardItemForDragOfButton:button]; |
| 1338 [[self folderTarget] fillPasteboard:pboard forDragOfButton:button]; | 1338 } |
| 1339 | 1339 |
| 1340 - (void)willBeginPasteboardDrag { |
| 1340 // Close our folder menu and submenus since we know we're going to be dragged. | 1341 // Close our folder menu and submenus since we know we're going to be dragged. |
| 1341 [self closeBookmarkFolder:self]; | 1342 [self closeBookmarkFolder:self]; |
| 1342 } | 1343 } |
| 1343 | 1344 |
| 1344 // Called from BookmarkButton. | 1345 // Called from BookmarkButton. |
| 1345 // Unlike bookmark_bar_controller's version, we DO default to being enabled. | 1346 // Unlike bookmark_bar_controller's version, we DO default to being enabled. |
| 1346 - (void)mouseEnteredButton:(id)sender event:(NSEvent*)event { | 1347 - (void)mouseEnteredButton:(id)sender event:(NSEvent*)event { |
| 1347 // Prevent unnecessary button selection change while scrolling due to the | 1348 // Prevent unnecessary button selection change while scrolling due to the |
| 1348 // size changing that happens in -performOneScroll:. | 1349 // size changing that happens in -performOneScroll:. |
| 1349 if (isScrolling_) | 1350 if (isScrolling_) |
| (...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2047 | 2048 |
| 2048 - (void)setIgnoreAnimations:(BOOL)ignore { | 2049 - (void)setIgnoreAnimations:(BOOL)ignore { |
| 2049 ignoreAnimations_ = ignore; | 2050 ignoreAnimations_ = ignore; |
| 2050 } | 2051 } |
| 2051 | 2052 |
| 2052 - (BookmarkButton*)buttonThatMouseIsIn { | 2053 - (BookmarkButton*)buttonThatMouseIsIn { |
| 2053 return buttonThatMouseIsIn_; | 2054 return buttonThatMouseIsIn_; |
| 2054 } | 2055 } |
| 2055 | 2056 |
| 2056 @end // BookmarkBarFolderController | 2057 @end // BookmarkBarFolderController |
| OLD | NEW |