summaryrefslogtreecommitdiffstats
path: root/ui/base/clipboard/clipboard_mac.mm
diff options
context:
space:
mode:
authordcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-08 23:50:54 +0000
committerdcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-08 23:50:54 +0000
commitc5c86ad1471abfa6b080756aa5258815781c57d5 (patch)
treebbd7709ca49e392c2d4547e393a067f560f45122 /ui/base/clipboard/clipboard_mac.mm
parentc3c3695c47cc541ea9de089bdaa6f6a05f062535 (diff)
downloadchromium_src-c5c86ad1471abfa6b080756aa5258815781c57d5.zip
chromium_src-c5c86ad1471abfa6b080756aa5258815781c57d5.tar.gz
chromium_src-c5c86ad1471abfa6b080756aa5258815781c57d5.tar.bz2
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
Diffstat (limited to 'ui/base/clipboard/clipboard_mac.mm')
-rw-r--r--ui/base/clipboard/clipboard_mac.mm7
1 files changed, 6 insertions, 1 deletions
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;
}