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