summaryrefslogtreecommitdiffstats
path: root/webkit/glue
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-24 17:13:38 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-24 17:13:38 +0000
commit606876c8312f1c1228a78ff3f28e65806c6b223c (patch)
tree82ea4c16106a07efc758c3f705c14277ba783c76 /webkit/glue
parentfe86d110746454b822c42742624eaa8aab740834 (diff)
downloadchromium_src-606876c8312f1c1228a78ff3f28e65806c6b223c.zip
chromium_src-606876c8312f1c1228a78ff3f28e65806c6b223c.tar.gz
chromium_src-606876c8312f1c1228a78ff3f28e65806c6b223c.tar.bz2
Pepper/Flapper: Add IsFormatAvailable() to PPB_Flash_Clipboard.
This requires a WebKit change (see https://bugs.webkit.org/show_bug.cgi?id=56868). BUG=none TEST=none Review URL: http://codereview.chromium.org/6724010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79289 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r--webkit/glue/webclipboard_impl.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/webkit/glue/webclipboard_impl.cc b/webkit/glue/webclipboard_impl.cc
index 9eddb68..10dddab 100644
--- a/webkit/glue/webclipboard_impl.cc
+++ b/webkit/glue/webclipboard_impl.cc
@@ -67,7 +67,15 @@ bool WebClipboardImpl::isFormatAvailable(Format format, Buffer buffer) {
ui::Clipboard::FormatType format_type;
ui::Clipboard::Buffer buffer_type;
+ if (!ConvertBufferType(buffer, &buffer_type))
+ return false;
+
switch (format) {
+ case FormatPlainText:
+ return ClipboardIsFormatAvailable(ui::Clipboard::GetPlainTextFormatType(),
+ buffer_type) ||
+ ClipboardIsFormatAvailable(ui::Clipboard::GetPlainTextWFormatType(),
+ buffer_type);
case FormatHTML:
format_type = ui::Clipboard::GetHtmlFormatType();
break;
@@ -84,9 +92,6 @@ bool WebClipboardImpl::isFormatAvailable(Format format, Buffer buffer) {
return false;
}
- if (!ConvertBufferType(buffer, &buffer_type))
- return false;
-
return ClipboardIsFormatAvailable(format_type, buffer_type);
}