From c5c86ad1471abfa6b080756aa5258815781c57d5 Mon Sep 17 00:00:00 2001 From: "dcheng@chromium.org" Date: Fri, 8 Apr 2011 23:50:54 +0000 Subject: Implement Clipboard::ReadAvailableTypes for Mac. BUG=75237 TEST=Local testing. Review URL: http://codereview.chromium.org/6823019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81015 0039d316-1c4b-4281-b951-d872f2087c98 --- ui/base/clipboard/clipboard_mac.mm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'ui/base/clipboard/clipboard_mac.mm') diff --git a/ui/base/clipboard/clipboard_mac.mm b/ui/base/clipboard/clipboard_mac.mm index e9dff9b..74b73f9 100644 --- a/ui/base/clipboard/clipboard_mac.mm +++ b/ui/base/clipboard/clipboard_mac.mm @@ -185,8 +185,13 @@ void Clipboard::ReadAvailableTypes(Clipboard::Buffer buffer, return; } - // TODO(dcheng): Implement me. types->clear(); + if (IsFormatAvailable(Clipboard::GetPlainTextFormatType(), buffer)) + types->push_back(UTF8ToUTF16(kMimeTypeText)); + if (IsFormatAvailable(Clipboard::GetHtmlFormatType(), buffer)) + types->push_back(UTF8ToUTF16(kMimeTypeHTML)); + if ([NSImage canInitWithPasteboard:GetPasteboard()]) + types->push_back(UTF8ToUTF16(kMimeTypePNG)); *contains_filenames = false; } -- cgit v1.1