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

Unified Diff: webkit/glue/webclipboard_impl.cc

Issue 6724010: Pepper/Flapper: Add IsFormatAvailable() to PPB_Flash_Clipboard. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | « ppapi/proxy/ppb_flash_clipboard_proxy.cc ('k') | webkit/plugins/ppapi/ppb_flash_clipboard_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webclipboard_impl.cc
diff --git a/webkit/glue/webclipboard_impl.cc b/webkit/glue/webclipboard_impl.cc
index 9eddb68bd46f68f9c84b2a7e5a64d29e1e567b32..10dddab7ddc4adc02dd59cf252ee0ef1611066fa 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);
}
« no previous file with comments | « ppapi/proxy/ppb_flash_clipboard_proxy.cc ('k') | webkit/plugins/ppapi/ppb_flash_clipboard_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698