summaryrefslogtreecommitdiffstats
path: root/webkit/glue
diff options
context:
space:
mode:
authordcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-07 23:28:29 +0000
committerdcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-07 23:28:29 +0000
commitff53be65f85e67b06d05f91c7c69a47ac7517625 (patch)
tree3116ab4bcbdcb08b8e04c0fef6a0909a2a906481 /webkit/glue
parent83ce153a1498beadb8415fac34d1465d160a4521 (diff)
downloadchromium_src-ff53be65f85e67b06d05f91c7c69a47ac7517625.zip
chromium_src-ff53be65f85e67b06d05f91c7c69a47ac7517625.tar.gz
chromium_src-ff53be65f85e67b06d05f91c7c69a47ac7517625.tar.bz2
Make Clipboard::FormatType an opaque handle type.
BUG=106523 TEST=ui_unittests --gtest_filter=ClipboardTest.* and manual testing Review URL: http://codereview.chromium.org/8801038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113502 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r--webkit/glue/webclipboard_impl.cc16
1 files changed, 7 insertions, 9 deletions
diff --git a/webkit/glue/webclipboard_impl.cc b/webkit/glue/webclipboard_impl.cc
index 000fea1..a6a6402 100644
--- a/webkit/glue/webclipboard_impl.cc
+++ b/webkit/glue/webclipboard_impl.cc
@@ -85,7 +85,6 @@ uint64 WebClipboardImpl::sequenceNumber(Buffer buffer) {
}
bool WebClipboardImpl::isFormatAvailable(Format format, Buffer buffer) {
- ui::Clipboard::FormatType format_type;
ui::Clipboard::Buffer buffer_type;
if (!ConvertBufferType(buffer, &buffer_type))
@@ -98,22 +97,21 @@ bool WebClipboardImpl::isFormatAvailable(Format format, Buffer buffer) {
client_->IsFormatAvailable(ui::Clipboard::GetPlainTextWFormatType(),
buffer_type);
case FormatHTML:
- format_type = ui::Clipboard::GetHtmlFormatType();
- break;
+ return client_->IsFormatAvailable(ui::Clipboard::GetHtmlFormatType(),
+ buffer_type);
case FormatSmartPaste:
- format_type = ui::Clipboard::GetWebKitSmartPasteFormatType();
- break;
+ return client_->IsFormatAvailable(
+ ui::Clipboard::GetWebKitSmartPasteFormatType(), buffer_type);
case FormatBookmark:
#if defined(OS_WIN) || defined(OS_MACOSX)
- format_type = ui::Clipboard::GetUrlWFormatType();
- break;
+ return client_->IsFormatAvailable(ui::Clipboard::GetUrlWFormatType(),
+ buffer_type);
#endif
default:
NOTREACHED();
- return false;
}
- return client_->IsFormatAvailable(format_type, buffer_type);
+ return false;
}
WebVector<WebString> WebClipboardImpl::readAvailableTypes(