Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(170)

Unified Diff: ui/base/clipboard/clipboard_util_mac.h

Issue 1855583002: Refactor more clipboard/bookmark logic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@temp15_dnd
Patch Set: Comments from avi. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/base/clipboard/clipboard_mac.mm ('k') | ui/base/clipboard/clipboard_util_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/clipboard/clipboard_util_mac.h
diff --git a/ui/base/clipboard/clipboard_util_mac.h b/ui/base/clipboard/clipboard_util_mac.h
index 5d62cfa0f6484d30b47a1ba3539daba7c2645c90..1c4ff0ad99d911e747bad7bcb01ee056ca92fdc7 100644
--- a/ui/base/clipboard/clipboard_util_mac.h
+++ b/ui/base/clipboard/clipboard_util_mac.h
@@ -35,6 +35,11 @@ class UI_BASE_EXPORT ClipboardUtil {
NSString* url,
NSString* title);
+ // Returns an NSPasteboardItem that represents the given |urls| and |titles|.
+ static base::scoped_nsobject<NSPasteboardItem> PasteboardItemFromUrls(
+ NSArray* urls,
+ NSArray* titles);
+
// Returns an NSPasteboardItem that represents the given string.
// |string| must not be nil.
static base::scoped_nsobject<NSPasteboardItem> PasteboardItemFromString(
@@ -44,6 +49,21 @@ class UI_BASE_EXPORT ClipboardUtil {
// url NSPasteboardItem.
static NSString* GetTitleFromPasteboardURL(NSPasteboard* pboard);
static NSString* GetURLFromPasteboardURL(NSPasteboard* pboard);
+
+ // Returns the UTI of a pasteboard type.
+ static NSString* UTIForPasteboardType(NSString* type);
+ static NSString* UTIForWebURLsAndTitles();
+
+ // For each pasteboard type in |item| that is not in |pboard|, add the type
+ // and its associated data.
+ static void AddDataToPasteboard(NSPasteboard* pboard, NSPasteboardItem* item);
+
+ // Returns whether the operation was succesful. On success, the two arrays are
+ // guaranteed to be equal length, and are populated with strings of |urls| and
+ // |titles|.
+ static bool URLsAndTitlesFromPasteboard(NSPasteboard* pboard,
+ NSArray** urls,
+ NSArray** titles);
};
}
« no previous file with comments | « ui/base/clipboard/clipboard_mac.mm ('k') | ui/base/clipboard/clipboard_util_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698