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

Unified Diff: webkit/glue/webclipboard_impl.cc

Issue 8801038: Make Clipboard::FormatType an opaque handle type. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years 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 | « ui/base/clipboard/scoped_clipboard_writer.cc ('k') | no next file » | 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 000fea18899280e181656b64f57e1a871bd73acf..a6a6402c3ce4c474f2d41e3741903ae1b1208aad 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(
« no previous file with comments | « ui/base/clipboard/scoped_clipboard_writer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698