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 "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" | 5 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" |
6 | 6 |
7 #include "app/mac/nsimage_cache.h" | 7 #include "app/mac/nsimage_cache.h" |
8 #include "base/mac/mac_util.h" | 8 #include "base/mac/mac_util.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
(...skipping 2296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2307 if (node) { | 2307 if (node) { |
2308 const BookmarkNode* parent = node->parent(); | 2308 const BookmarkNode* parent = node->parent(); |
2309 bookmarkModel_->Remove(parent, | 2309 bookmarkModel_->Remove(parent, |
2310 parent->GetIndexOf(node)); | 2310 parent->GetIndexOf(node)); |
2311 } | 2311 } |
2312 } | 2312 } |
2313 } | 2313 } |
2314 | 2314 |
2315 - (void)bookmarkDragDidEnd:(BookmarkButton*)button | 2315 - (void)bookmarkDragDidEnd:(BookmarkButton*)button |
2316 operation:(NSDragOperation)operation { | 2316 operation:(NSDragOperation)operation { |
2317 [self closeFolderAndStopTrackingMenus]; | |
2318 [button setHidden:NO]; | 2317 [button setHidden:NO]; |
2319 [self resetAllButtonPositionsWithAnimation:YES]; | 2318 [self resetAllButtonPositionsWithAnimation:YES]; |
2320 } | 2319 } |
2321 | 2320 |
2322 | 2321 |
2323 #pragma mark BookmarkButtonControllerProtocol | 2322 #pragma mark BookmarkButtonControllerProtocol |
2324 | 2323 |
2325 // Close all bookmark folders. "Folder" here is the fake menu for | 2324 // Close all bookmark folders. "Folder" here is the fake menu for |
2326 // bookmark folders, not a button context menu. | 2325 // bookmark folders, not a button context menu. |
2327 - (void)closeAllBookmarkFolders { | 2326 - (void)closeAllBookmarkFolders { |
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2728 // to minimize touching the object passed in (likely a mock). | 2727 // to minimize touching the object passed in (likely a mock). |
2729 - (void)setButtonContextMenu:(id)menu { | 2728 - (void)setButtonContextMenu:(id)menu { |
2730 buttonContextMenu_ = menu; | 2729 buttonContextMenu_ = menu; |
2731 } | 2730 } |
2732 | 2731 |
2733 - (void)setIgnoreAnimations:(BOOL)ignore { | 2732 - (void)setIgnoreAnimations:(BOOL)ignore { |
2734 ignoreAnimations_ = ignore; | 2733 ignoreAnimations_ = ignore; |
2735 } | 2734 } |
2736 | 2735 |
2737 @end | 2736 @end |
OLD | NEW |