| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "components/bookmarks/browser/bookmark_pasteboard_helper_mac.h" | 5 #include "components/bookmarks/browser/bookmark_pasteboard_helper_mac.h" |
| 6 | 6 |
| 7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
| 8 | 8 |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/strings/sys_string_conversions.h" | 10 #include "base/strings/sys_string_conversions.h" |
| 11 #include "components/bookmarks/browser/bookmark_node.h" | 11 #include "components/bookmarks/browser/bookmark_node.h" |
| 12 #include "ui/base/clipboard/clipboard.h" | 12 #include "ui/base/clipboard/clipboard.h" |
| 13 | 13 |
| 14 using bookmarks::BookmarkNodeData; | |
| 15 | |
| 16 NSString* const kBookmarkDictionaryListPboardType = | 14 NSString* const kBookmarkDictionaryListPboardType = |
| 17 @"BookmarkDictionaryListPboardType"; | 15 @"BookmarkDictionaryListPboardType"; |
| 18 | 16 |
| 17 namespace bookmarks { |
| 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 // An unofficial standard pasteboard title type to be provided alongside the | 21 // An unofficial standard pasteboard title type to be provided alongside the |
| 22 // |NSURLPboardType|. | 22 // |NSURLPboardType|. |
| 23 NSString* const kNSURLTitlePboardType = @"public.url-name"; | 23 NSString* const kNSURLTitlePboardType = @"public.url-name"; |
| 24 | 24 |
| 25 // Pasteboard type used to store profile path to determine which profile | 25 // Pasteboard type used to store profile path to determine which profile |
| 26 // a set of bookmarks came from. | 26 // a set of bookmarks came from. |
| 27 NSString* const kChromiumProfilePathPboardType = | 27 NSString* const kChromiumProfilePathPboardType = |
| 28 @"ChromiumProfilePathPboardType"; | 28 @"ChromiumProfilePathPboardType"; |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 bool PasteboardContainsBookmarks(ui::ClipboardType type) { | 324 bool PasteboardContainsBookmarks(ui::ClipboardType type) { |
| 325 NSPasteboard* pb = PasteboardFromType(type); | 325 NSPasteboard* pb = PasteboardFromType(type); |
| 326 | 326 |
| 327 NSArray* availableTypes = | 327 NSArray* availableTypes = |
| 328 [NSArray arrayWithObjects:kBookmarkDictionaryListPboardType, | 328 [NSArray arrayWithObjects:kBookmarkDictionaryListPboardType, |
| 329 kCrWebURLsWithTitlesPboardType, | 329 kCrWebURLsWithTitlesPboardType, |
| 330 NSURLPboardType, | 330 NSURLPboardType, |
| 331 nil]; | 331 nil]; |
| 332 return [pb availableTypeFromArray:availableTypes] != nil; | 332 return [pb availableTypeFromArray:availableTypes] != nil; |
| 333 } | 333 } |
| 334 |
| 335 } // namespace bookmarks |
| OLD | NEW |