diff options
author | dcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-04 18:16:44 +0000 |
---|---|---|
committer | dcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-04 18:16:44 +0000 |
commit | 36780a15c5a9d7d7d1fa34f982a71d6072415e4a (patch) | |
tree | 167309420331862eb9b105d9a927e0ef0da90658 /webkit/glue | |
parent | 0c52d8f310ef416feeb0ef79533b2d76ac19d972 (diff) | |
download | chromium_src-36780a15c5a9d7d7d1fa34f982a71d6072415e4a.zip chromium_src-36780a15c5a9d7d7d1fa34f982a71d6072415e4a.tar.gz chromium_src-36780a15c5a9d7d7d1fa34f982a71d6072415e4a.tar.bz2 |
Remove unused clipboard methods.
BUG=none
TEST=chrome, test_shell, and DumpRenderTree all still compile.
Review URL: http://codereview.chromium.org/8446011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108683 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r-- | webkit/glue/webclipboard_impl.cc | 59 | ||||
-rw-r--r-- | webkit/glue/webclipboard_impl.h | 14 | ||||
-rw-r--r-- | webkit/glue/webkit_glue.h | 14 |
3 files changed, 20 insertions, 67 deletions
diff --git a/webkit/glue/webclipboard_impl.cc b/webkit/glue/webclipboard_impl.cc index 91876c6..888de27 100644 --- a/webkit/glue/webclipboard_impl.cc +++ b/webkit/glue/webclipboard_impl.cc @@ -63,6 +63,10 @@ std::string WebClipboardImpl::URLToImageMarkup(const WebURL& url, WebClipboardImpl::~WebClipboardImpl() { } +uint64 WebClipboardImpl::getSequenceNumber() { + return ClipboardGetSequenceNumber(); +} + bool WebClipboardImpl::isFormatAvailable(Format format, Buffer buffer) { ui::Clipboard::FormatType format_type; ui::Clipboard::Buffer buffer_type; @@ -95,6 +99,16 @@ bool WebClipboardImpl::isFormatAvailable(Format format, Buffer buffer) { return ClipboardIsFormatAvailable(format_type, buffer_type); } +WebVector<WebString> WebClipboardImpl::readAvailableTypes( + Buffer buffer, bool* contains_filenames) { + ui::Clipboard::Buffer buffer_type; + std::vector<string16> types; + if (ConvertBufferType(buffer, &buffer_type)) { + ClipboardReadAvailableTypes(buffer_type, &types, contains_filenames); + } + return types; +} + WebString WebClipboardImpl::readPlainText(Buffer buffer) { ui::Clipboard::Buffer buffer_type; if (!ConvertBufferType(buffer, &buffer_type)) @@ -145,10 +159,6 @@ WebData WebClipboardImpl::readImage(Buffer buffer) { return WebData(png_data); } -uint64 WebClipboardImpl::getSequenceNumber() { - return ClipboardGetSequenceNumber(); -} - void WebClipboardImpl::writeHTML( const WebString& html_text, const WebURL& source_url, const WebString& plain_text, bool write_smart_paste) { @@ -202,47 +212,6 @@ void WebClipboardImpl::writeImage( } } -void WebClipboardImpl::writeData(const WebString& type, - const WebString& data, - const WebString& metadata) { - // TODO(dcheng): Implement this stub. -} - -WebVector<WebString> WebClipboardImpl::readAvailableTypes( - Buffer buffer, bool* contains_filenames) { - ui::Clipboard::Buffer buffer_type; - std::vector<string16> types; - if (ConvertBufferType(buffer, &buffer_type)) { - ClipboardReadAvailableTypes(buffer_type, &types, contains_filenames); - } - return types; -} - -bool WebClipboardImpl::readData(Buffer buffer, const WebString& type, - WebString* data, WebString* metadata) { - ui::Clipboard::Buffer buffer_type; - if (!ConvertBufferType(buffer, &buffer_type)) - return false; - - string16 data_out; - string16 metadata_out; - bool result = ClipboardReadData(buffer_type, type, &data_out, &metadata_out); - if (result) { - *data = data_out; - *metadata = metadata_out; - } - return result; -} - -WebVector<WebString> WebClipboardImpl::readFilenames(Buffer buffer) { - ui::Clipboard::Buffer buffer_type; - std::vector<string16> filenames; - if (ConvertBufferType(buffer, &buffer_type)) { - ClipboardReadFilenames(buffer_type, &filenames); - } - return filenames; -} - bool WebClipboardImpl::ConvertBufferType(Buffer buffer, ui::Clipboard::Buffer* result) { switch (buffer) { diff --git a/webkit/glue/webclipboard_impl.h b/webkit/glue/webclipboard_impl.h index 7d1adb7..e0bc399 100644 --- a/webkit/glue/webclipboard_impl.h +++ b/webkit/glue/webclipboard_impl.h @@ -22,7 +22,10 @@ class WebClipboardImpl : public WebKit::WebClipboard { virtual ~WebClipboardImpl(); // WebClipboard methods: + virtual uint64 getSequenceNumber(); virtual bool isFormatAvailable(Format, Buffer); + virtual WebKit::WebVector<WebKit::WebString> readAvailableTypes( + Buffer, bool* contains_filenames); virtual WebKit::WebString readPlainText(Buffer); virtual WebKit::WebString readHTML( Buffer, @@ -30,7 +33,6 @@ class WebClipboardImpl : public WebKit::WebClipboard { unsigned* fragment_start, unsigned* fragment_end); virtual WebKit::WebData readImage(Buffer); - virtual uint64 getSequenceNumber(); virtual void writeHTML( const WebKit::WebString& html_text, const WebKit::WebURL& source_url, @@ -44,16 +46,6 @@ class WebClipboardImpl : public WebKit::WebClipboard { const WebKit::WebImage&, const WebKit::WebURL& source_url, const WebKit::WebString& title); - virtual void writeData( - const WebKit::WebString& type, - const WebKit::WebString& data, - const WebKit::WebString& metadata); - - virtual WebKit::WebVector<WebKit::WebString> readAvailableTypes( - Buffer, bool* contains_filenames); - virtual bool readData(Buffer, const WebKit::WebString& type, - WebKit::WebString* data, WebKit::WebString* metadata); - virtual WebKit::WebVector<WebKit::WebString> readFilenames(Buffer); private: bool ConvertBufferType(Buffer, ui::Clipboard::Buffer*); diff --git a/webkit/glue/webkit_glue.h b/webkit/glue/webkit_glue.h index 66ba1a5..e4a5ab0 100644 --- a/webkit/glue/webkit_glue.h +++ b/webkit/glue/webkit_glue.h @@ -173,6 +173,9 @@ base::StringPiece GetDataResource(int resource_id); // Get a clipboard that can be used to construct a ScopedClipboardWriterGlue. ui::Clipboard* ClipboardGetClipboard(); +// Get a sequence number which uniquely identifies clipboard state. +uint64 ClipboardGetSequenceNumber(); + // Tests whether the clipboard contains a certain format bool ClipboardIsFormatAvailable(const ui::Clipboard::FormatType& format, ui::Clipboard::Buffer buffer); @@ -195,17 +198,6 @@ void ClipboardReadHTML(ui::Clipboard::Buffer buffer, string16* markup, void ClipboardReadImage(ui::Clipboard::Buffer buffer, std::string* data); -// Reads one type of data from the clipboard, if available. -bool ClipboardReadData(ui::Clipboard::Buffer buffer, const string16& type, - string16* data, string16* metadata); - -// Get a sequence number which uniquely identifies clipboard state. -uint64 ClipboardGetSequenceNumber(); - -// Reads filenames from the clipboard, if available. -bool ClipboardReadFilenames(ui::Clipboard::Buffer buffer, - std::vector<string16>* filenames); - // Embedders implement this function to return the list of plugins to Webkit. void GetPlugins(bool refresh, std::vector<webkit::WebPluginInfo>* plugins); |