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

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

Issue 814833007: bookmarks: Move bookmark_pasteboard_helper_mac functions into 'bookmarks' namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 | « no previous file | chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view_cocoa.mm » ('j') | 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/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" 8 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h"
9 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_folder_target.h" 9 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_folder_target.h"
10 #import "chrome/browser/ui/cocoa/browser_window_controller.h" 10 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 // Virtually identical to [BookmarkBarView draggingEntered:]. 51 // Virtually identical to [BookmarkBarView draggingEntered:].
52 // TODO(jrg): find a way to share code. Lack of multiple inheritance 52 // TODO(jrg): find a way to share code. Lack of multiple inheritance
53 // makes things more of a pain but there should be no excuse for laziness. 53 // makes things more of a pain but there should be no excuse for laziness.
54 // http://crbug.com/35966 54 // http://crbug.com/35966
55 - (NSDragOperation)draggingEntered:(id<NSDraggingInfo>)info { 55 - (NSDragOperation)draggingEntered:(id<NSDraggingInfo>)info {
56 inDrag_ = YES; 56 inDrag_ = YES;
57 if (![[self controller] draggingAllowed:info]) 57 if (![[self controller] draggingAllowed:info])
58 return NSDragOperationNone; 58 return NSDragOperationNone;
59 if ([[info draggingPasteboard] dataForType:kBookmarkButtonDragType] || 59 if ([[info draggingPasteboard] dataForType:kBookmarkButtonDragType] ||
60 PasteboardContainsBookmarks(ui::CLIPBOARD_TYPE_DRAG) || 60 bookmarks::PasteboardContainsBookmarks(ui::CLIPBOARD_TYPE_DRAG) ||
61 [[info draggingPasteboard] containsURLData]) { 61 [[info draggingPasteboard] containsURLData]) {
62 // Find the position of the drop indicator. 62 // Find the position of the drop indicator.
63 BOOL showIt = [[self controller] 63 BOOL showIt = [[self controller]
64 shouldShowIndicatorShownForPoint:[info draggingLocation]]; 64 shouldShowIndicatorShownForPoint:[info draggingLocation]];
65 if (!showIt) { 65 if (!showIt) {
66 [self setDropIndicatorShown:NO]; 66 [self setDropIndicatorShown:NO];
67 } else { 67 } else {
68 [self setDropIndicatorShown:YES]; 68 [self setDropIndicatorShown:YES];
69 69
70 CGFloat y = [[self controller] 70 CGFloat y = [[self controller]
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 [dropIndicator_ setBorderType:NSLineBorder]; 200 [dropIndicator_ setBorderType:NSLineBorder];
201 [dropIndicator_ setAlphaValue:0.85]; 201 [dropIndicator_ setAlphaValue:0.85];
202 [self addSubview:dropIndicator_]; 202 [self addSubview:dropIndicator_];
203 } else { 203 } else {
204 [dropIndicator_ removeFromSuperview]; 204 [dropIndicator_ removeFromSuperview];
205 dropIndicator_.reset(); 205 dropIndicator_.reset();
206 } 206 }
207 } 207 }
208 208
209 @end 209 @end
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698