| 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_view_cocoa.h" | 5 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view_cocoa.h" |
| 6 | 6 |
| 7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
| 8 #import "chrome/browser/themes/theme_properties.h" | 8 #import "chrome/browser/themes/theme_properties.h" |
| 9 #import "chrome/browser/themes/theme_service.h" | 9 #import "chrome/browser/themes/theme_service.h" |
| 10 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" | 10 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 else | 120 else |
| 121 [controller_ clearDropInsertionPos]; | 121 [controller_ clearDropInsertionPos]; |
| 122 } | 122 } |
| 123 | 123 |
| 124 // NSDraggingDestination methods | 124 // NSDraggingDestination methods |
| 125 | 125 |
| 126 - (NSDragOperation)draggingEntered:(id<NSDraggingInfo>)info { | 126 - (NSDragOperation)draggingEntered:(id<NSDraggingInfo>)info { |
| 127 if (![controller_ draggingAllowed:info]) | 127 if (![controller_ draggingAllowed:info]) |
| 128 return NSDragOperationNone; | 128 return NSDragOperationNone; |
| 129 if ([[info draggingPasteboard] dataForType:kBookmarkButtonDragType] || | 129 if ([[info draggingPasteboard] dataForType:kBookmarkButtonDragType] || |
| 130 PasteboardContainsBookmarks(ui::CLIPBOARD_TYPE_DRAG) || | 130 bookmarks::PasteboardContainsBookmarks(ui::CLIPBOARD_TYPE_DRAG) || |
| 131 [[info draggingPasteboard] containsURLData]) { | 131 [[info draggingPasteboard] containsURLData]) { |
| 132 // We only show the drop indicator if we're not in a position to | 132 // We only show the drop indicator if we're not in a position to |
| 133 // perform a hover-open since it doesn't make sense to do both. | 133 // perform a hover-open since it doesn't make sense to do both. |
| 134 BOOL showIt = [controller_ shouldShowIndicatorShownForPoint: | 134 BOOL showIt = [controller_ shouldShowIndicatorShownForPoint: |
| 135 [info draggingLocation]]; | 135 [info draggingLocation]]; |
| 136 if (!showIt) { | 136 if (!showIt) { |
| 137 if (dropIndicatorShown_) { | 137 if (dropIndicatorShown_) { |
| 138 dropIndicatorShown_ = NO; | 138 dropIndicatorShown_ = NO; |
| 139 [self dropIndicatorChanged]; | 139 [self dropIndicatorChanged]; |
| 140 } | 140 } |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 | 278 |
| 279 @end // @implementation BookmarkBarTextField | 279 @end // @implementation BookmarkBarTextField |
| 280 | 280 |
| 281 @implementation BookmarkBarItemContainer | 281 @implementation BookmarkBarItemContainer |
| 282 | 282 |
| 283 - (NSMenu*)menu { | 283 - (NSMenu*)menu { |
| 284 return [barView_ menu]; | 284 return [barView_ menu]; |
| 285 } | 285 } |
| 286 | 286 |
| 287 @end // @implementation BookmarkBarItemContainer | 287 @end // @implementation BookmarkBarItemContainer |
| OLD | NEW |