diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-21 00:40:28 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-21 00:40:28 +0000 |
commit | bb7538fede8db4268fcb2fc5fd6d283ad70fb54f (patch) | |
tree | eb3f3db88d3036a099a50a51859addc215f79235 /content/renderer/webclipboard_impl.h | |
parent | 43f249f91fedfe6f29df23c299fe776848589313 (diff) | |
download | chromium_src-bb7538fede8db4268fcb2fc5fd6d283ad70fb54f.zip chromium_src-bb7538fede8db4268fcb2fc5fd6d283ad70fb54f.tar.gz chromium_src-bb7538fede8db4268fcb2fc5fd6d283ad70fb54f.tar.bz2 |
Move the following clipboard files from webkit\glue to content\renderer. These files now live in the content_renderer target.
1. scoped_clipboard_writer_glue.h
2. scoped_clipboard_writer_glue.cc
3. webclipboard_impl.cc
4. webclipboard_impl.h
5. clipboard_client.h
I moved the static functions URLToMarkup and URLToImageMarkup out of the WebClipboardImpl class to the
newly added webkit\renderer\clipboard_utils.cc/.h files as these functions are used by the MockWebClipboardImpl class
which lives in webkit\support. This class is eventually used by the webkit_unit_tests target. Moving these functions out
avoids the dependency on content in webkit_unit_tests.
This is continuation of the ongoing work for bug https://code.google.com/p/chromium/issues/detail?can=2&q=237249
which is splitting chrome.dll into a browser and renderer component due to build issues on Windows.
BUG=237249
R=jamesr@chromium.org
Review URL: https://codereview.chromium.org/17420005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207657 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/webclipboard_impl.h')
-rw-r--r-- | content/renderer/webclipboard_impl.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/content/renderer/webclipboard_impl.h b/content/renderer/webclipboard_impl.h new file mode 100644 index 0000000..e5a12aa --- /dev/null +++ b/content/renderer/webclipboard_impl.h @@ -0,0 +1,62 @@ +// Copyright (c) 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CONTENT_RENDERER_WEBCLIPBOARD_IMPL_H_ +#define CONTENT_RENDERER_WEBCLIPBOARD_IMPL_H_ + +#include "base/compiler_specific.h" + +#include "third_party/WebKit/public/platform/WebClipboard.h" +#include "ui/base/clipboard/clipboard.h" + +#include <string> + +namespace content { +class ClipboardClient; + +class WebClipboardImpl : public WebKit::WebClipboard { + public: + explicit WebClipboardImpl(ClipboardClient* client); + + virtual ~WebClipboardImpl(); + + // WebClipboard methods: + virtual uint64 getSequenceNumber(); + virtual uint64 sequenceNumber(Buffer buffer); + virtual bool isFormatAvailable(Format format, Buffer buffer); + virtual WebKit::WebVector<WebKit::WebString> readAvailableTypes( + Buffer buffer, bool* contains_filenames); + virtual WebKit::WebString readPlainText(Buffer buffer); + virtual WebKit::WebString readHTML( + Buffer buffer, + WebKit::WebURL* source_url, + unsigned* fragment_start, + unsigned* fragment_end); + virtual WebKit::WebData readImage(Buffer buffer); + virtual WebKit::WebString readCustomData( + Buffer buffer, const WebKit::WebString& type); + virtual void writeHTML( + const WebKit::WebString& html_text, + const WebKit::WebURL& source_url, + const WebKit::WebString& plain_text, + bool write_smart_paste); + virtual void writePlainText(const WebKit::WebString& plain_text); + virtual void writeURL( + const WebKit::WebURL& url, + const WebKit::WebString& title); + virtual void writeImage( + const WebKit::WebImage& image, + const WebKit::WebURL& source_url, + const WebKit::WebString& title); + virtual void writeDataObject(const WebKit::WebDragData& data); + + private: + bool ConvertBufferType(Buffer, ui::Clipboard::Buffer*); + ClipboardClient* client_; +}; + +} // namespace content + +#endif // CONTENT_RENDERER_WEBCLIPBOARD_IMPL_H_ + |