Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(140)

Side by Side Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm

Issue 8383026: [Mac] Don't crash when dragging and dropping bookmarks within a bookmarks folder. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_folder_controller.h" 5 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.h"
6 6
7 #include "base/mac/mac_util.h" 7 #include "base/mac/mac_util.h"
8 #include "base/sys_string_conversions.h" 8 #include "base/sys_string_conversions.h"
9 #include "chrome/browser/bookmarks/bookmark_model.h" 9 #include "chrome/browser/bookmarks/bookmark_model.h"
10 #include "chrome/browser/bookmarks/bookmark_utils.h" 10 #include "chrome/browser/bookmarks/bookmark_utils.h"
(...skipping 1343 matching lines...) Expand 10 before | Expand all | Expand 10 after
1354 // possible that a cancelPreviousPerformRequestsWithTarget: reduces 1354 // possible that a cancelPreviousPerformRequestsWithTarget: reduces
1355 // the refcount to 0, releasing us. That's a bad thing to do while 1355 // the refcount to 0, releasing us. That's a bad thing to do while
1356 // this object (or others it may own) is in the event chain. Thus 1356 // this object (or others it may own) is in the event chain. Thus
1357 // we have a retain/autorelease. 1357 // we have a retain/autorelease.
1358 [self retain]; 1358 [self retain];
1359 [NSObject cancelPreviousPerformRequestsWithTarget:self]; 1359 [NSObject cancelPreviousPerformRequestsWithTarget:self];
1360 [self autorelease]; 1360 [self autorelease];
1361 } 1361 }
1362 1362
1363 - (NSWindow*)browserWindow { 1363 - (NSWindow*)browserWindow {
1364 return [parentController_ browserWindow]; 1364 return [barController_ browserWindow];
1365 } 1365 }
1366 1366
1367 - (BOOL)canDragBookmarkButtonToTrash:(BookmarkButton*)button { 1367 - (BOOL)canDragBookmarkButtonToTrash:(BookmarkButton*)button {
1368 return [barController_ canEditBookmarks] && 1368 return [barController_ canEditBookmarks] &&
1369 [barController_ canEditBookmark:[button bookmarkNode]]; 1369 [barController_ canEditBookmark:[button bookmarkNode]];
1370 } 1370 }
1371 1371
1372 - (void)didDragBookmarkToTrash:(BookmarkButton*)button { 1372 - (void)didDragBookmarkToTrash:(BookmarkButton*)button {
1373 [barController_ didDragBookmarkToTrash:button]; 1373 [barController_ didDragBookmarkToTrash:button];
1374 } 1374 }
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after
1985 1985
1986 - (void)setIgnoreAnimations:(BOOL)ignore { 1986 - (void)setIgnoreAnimations:(BOOL)ignore {
1987 ignoreAnimations_ = ignore; 1987 ignoreAnimations_ = ignore;
1988 } 1988 }
1989 1989
1990 - (BookmarkButton*)buttonThatMouseIsIn { 1990 - (BookmarkButton*)buttonThatMouseIsIn {
1991 return buttonThatMouseIsIn_; 1991 return buttonThatMouseIsIn_;
1992 } 1992 }
1993 1993
1994 @end // BookmarkBarFolderController 1994 @end // BookmarkBarFolderController
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698