| 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_folder_target.h" | 5 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_folder_target.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/strings/sys_string_conversions.h" | 8 #include "base/strings/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_node_data.h" | 10 #include "chrome/browser/bookmarks/bookmark_node_data.h" |
| 11 #include "chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.h" | 11 #include "chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.h" |
| 12 #include "chrome/browser/profiles/profile_manager.h" | 12 #include "chrome/browser/profiles/profile_manager.h" |
| 13 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.h" | 13 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.h" |
| 14 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_button.h" | 14 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_button.h" |
| 15 #import "ui/base/cocoa/cocoa_event_utils.h" | 15 #import "ui/base/cocoa/cocoa_base_utils.h" |
| 16 | 16 |
| 17 NSString* kBookmarkButtonDragType = @"ChromiumBookmarkButtonDragType"; | 17 NSString* kBookmarkButtonDragType = @"ChromiumBookmarkButtonDragType"; |
| 18 | 18 |
| 19 @interface BookmarkFolderTarget() | 19 @interface BookmarkFolderTarget() |
| 20 // Copies the given bookmark node to the given pasteboard, declaring appropriate | 20 // Copies the given bookmark node to the given pasteboard, declaring appropriate |
| 21 // types (to paste a URL with a title). | 21 // types (to paste a URL with a title). |
| 22 - (void)copyBookmarkNode:(const BookmarkNode*)node | 22 - (void)copyBookmarkNode:(const BookmarkNode*)node |
| 23 toDragPasteboard:(NSPasteboard*)pboard; | 23 toDragPasteboard:(NSPasteboard*)pboard; |
| 24 @end | 24 @end |
| 25 | 25 |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 [pboard addTypes:[NSArray arrayWithObject:kBookmarkButtonDragType] | 116 [pboard addTypes:[NSArray arrayWithObject:kBookmarkButtonDragType] |
| 117 owner:nil]; | 117 owner:nil]; |
| 118 [pboard setData:[NSData dataWithBytes:&button length:sizeof(button)] | 118 [pboard setData:[NSData dataWithBytes:&button length:sizeof(button)] |
| 119 forType:kBookmarkButtonDragType]; | 119 forType:kBookmarkButtonDragType]; |
| 120 } else { | 120 } else { |
| 121 NOTREACHED(); | 121 NOTREACHED(); |
| 122 } | 122 } |
| 123 } | 123 } |
| 124 | 124 |
| 125 @end | 125 @end |
| OLD | NEW |