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

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

Issue 109693003: mac: Bookmark bar drag and drop bug. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: typos Created 7 years 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
« no previous file with comments | « chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_hover_state.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_view.h" 5 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_view.h"
6 6
7 #include "chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.h" 7 #include "chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" 9 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h"
10 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_folder_target.h" 10 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_folder_target.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 - (void)draggingEnded:(id<NSDraggingInfo>)info { 92 - (void)draggingEnded:(id<NSDraggingInfo>)info {
93 // Awkwardness since views open and close out from under us. 93 // Awkwardness since views open and close out from under us.
94 if (inDrag_) { 94 if (inDrag_) {
95 inDrag_ = NO; 95 inDrag_ = NO;
96 } 96 }
97 97
98 [self draggingExited:info]; 98 [self draggingExited:info];
99 } 99 }
100 100
101 - (BOOL)wantsPeriodicDraggingUpdates { 101 - (BOOL)wantsPeriodicDraggingUpdates {
102 // TODO(jrg): This should probably return |YES| and the controller should 102 // TODO(jrg): The controller should slide the existing bookmark buttons
103 // slide the existing bookmark buttons interactively to the side to make 103 // interactively to the side to make room for the about-to-be-dropped
104 // room for the about-to-be-dropped bookmark. 104 // bookmark.
105 // http://crbug.com/35968 105 // http://crbug.com/35968
106 return NO; 106
107 // The bookmark_bar_folder_hover_state expects continuous callbacks.
108 return YES;
107 } 109 }
108 110
109 - (NSDragOperation)draggingUpdated:(id<NSDraggingInfo>)info { 111 - (NSDragOperation)draggingUpdated:(id<NSDraggingInfo>)info {
110 // For now it's the same as draggingEntered:. 112 // For now it's the same as draggingEntered:.
111 // TODO(jrg): once we return YES for wantsPeriodicDraggingUpdates, 113 // TODO(jrg): once we return YES for wantsPeriodicDraggingUpdates,
112 // this should ping the [self controller] to perform animations. 114 // this should ping the [self controller] to perform animations.
113 // http://crbug.com/35968 115 // http://crbug.com/35968
114 return [self draggingEntered:info]; 116 return [self draggingEntered:info];
115 } 117 }
116 118
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 [dropIndicator_ setBorderType:NSLineBorder]; 199 [dropIndicator_ setBorderType:NSLineBorder];
198 [dropIndicator_ setAlphaValue:0.85]; 200 [dropIndicator_ setAlphaValue:0.85];
199 [self addSubview:dropIndicator_]; 201 [self addSubview:dropIndicator_];
200 } else { 202 } else {
201 [dropIndicator_ removeFromSuperview]; 203 [dropIndicator_ removeFromSuperview];
202 dropIndicator_.reset(); 204 dropIndicator_.reset();
203 } 205 }
204 } 206 }
205 207
206 @end 208 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_hover_state.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698