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_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 #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 #include "content/browser/user_metrics.h" | 10 #include "content/browser/user_metrics.h" |
11 | 11 |
12 #import "third_party/mozilla/NSPasteboard+Utils.h" | 12 #import "third_party/mozilla/NSPasteboard+Utils.h" |
13 | 13 |
| 14 @interface BookmarkBarFolderView() |
| 15 |
| 16 @property(readonly, nonatomic) id<BookmarkButtonControllerProtocol> controller; |
| 17 |
| 18 @end |
| 19 |
14 @implementation BookmarkBarFolderView | 20 @implementation BookmarkBarFolderView |
15 | 21 |
16 @synthesize dropIndicatorShown = dropIndicatorShown_; | |
17 @synthesize dropIndicatorPosition = dropIndicatorPosition_; | |
18 @synthesize controller = controller_; | |
19 | |
20 - (void)awakeFromNib { | 22 - (void)awakeFromNib { |
21 NSArray* types = [NSArray arrayWithObjects: | 23 NSArray* types = [NSArray arrayWithObjects: |
22 NSStringPboardType, | 24 NSStringPboardType, |
23 NSHTMLPboardType, | 25 NSHTMLPboardType, |
24 NSURLPboardType, | 26 NSURLPboardType, |
25 kBookmarkButtonDragType, | 27 kBookmarkButtonDragType, |
26 kBookmarkDictionaryListPboardType, | 28 kBookmarkDictionaryListPboardType, |
27 nil]; | 29 nil]; |
28 [self registerForDraggedTypes:types]; | 30 [self registerForDraggedTypes:types]; |
29 } | 31 } |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 NSPasteboard* pboard = [info draggingPasteboard]; | 197 NSPasteboard* pboard = [info draggingPasteboard]; |
196 if ([pboard dataForType:kBookmarkButtonDragType] && | 198 if ([pboard dataForType:kBookmarkButtonDragType] && |
197 [self performDragOperationForBookmarkButton:info]) | 199 [self performDragOperationForBookmarkButton:info]) |
198 return YES; | 200 return YES; |
199 if ([pboard containsURLData] && [self performDragOperationForURL:info]) | 201 if ([pboard containsURLData] && [self performDragOperationForURL:info]) |
200 return YES; | 202 return YES; |
201 return NO; | 203 return NO; |
202 } | 204 } |
203 | 205 |
204 @end | 206 @end |
OLD | NEW |