| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_RENDERER_WEBCLIPBOARD_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_WEBCLIPBOARD_IMPL_H_ |
| 6 #define CONTENT_RENDERER_WEBCLIPBOARD_IMPL_H_ | 6 #define CONTENT_RENDERER_WEBCLIPBOARD_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 | |
| 10 #include "third_party/WebKit/public/platform/WebClipboard.h" | 9 #include "third_party/WebKit/public/platform/WebClipboard.h" |
| 11 #include "ui/base/clipboard/clipboard.h" | 10 #include "ui/base/clipboard/clipboard.h" |
| 12 | 11 |
| 13 #include <string> | 12 #include <string> |
| 14 | 13 |
| 15 namespace content { | 14 namespace content { |
| 16 class ClipboardClient; | 15 class RendererClipboardDelegate; |
| 17 | 16 |
| 18 class WebClipboardImpl : public blink::WebClipboard { | 17 class WebClipboardImpl : public blink::WebClipboard { |
| 19 public: | 18 public: |
| 20 explicit WebClipboardImpl(ClipboardClient* client); | 19 explicit WebClipboardImpl(RendererClipboardDelegate* delegate); |
| 21 | 20 |
| 22 virtual ~WebClipboardImpl(); | 21 virtual ~WebClipboardImpl(); |
| 23 | 22 |
| 24 // WebClipboard methods: | 23 // WebClipboard methods: |
| 25 virtual uint64 sequenceNumber(Buffer buffer); | 24 virtual uint64 sequenceNumber(Buffer buffer); |
| 26 virtual bool isFormatAvailable(Format format, Buffer buffer); | 25 virtual bool isFormatAvailable(Format format, Buffer buffer); |
| 27 virtual blink::WebVector<blink::WebString> readAvailableTypes( | 26 virtual blink::WebVector<blink::WebString> readAvailableTypes( |
| 28 Buffer buffer, bool* contains_filenames); | 27 Buffer buffer, bool* contains_filenames); |
| 29 virtual blink::WebString readPlainText(Buffer buffer); | 28 virtual blink::WebString readPlainText(Buffer buffer); |
| 30 virtual blink::WebString readHTML( | 29 virtual blink::WebString readHTML( |
| (...skipping 11 matching lines...) Expand all Loading... |
| 42 const blink::WebString& plain_text, | 41 const blink::WebString& plain_text, |
| 43 bool write_smart_paste); | 42 bool write_smart_paste); |
| 44 virtual void writeImage( | 43 virtual void writeImage( |
| 45 const blink::WebImage& image, | 44 const blink::WebImage& image, |
| 46 const blink::WebURL& source_url, | 45 const blink::WebURL& source_url, |
| 47 const blink::WebString& title); | 46 const blink::WebString& title); |
| 48 virtual void writeDataObject(const blink::WebDragData& data); | 47 virtual void writeDataObject(const blink::WebDragData& data); |
| 49 | 48 |
| 50 private: | 49 private: |
| 51 bool ConvertBufferType(Buffer, ui::ClipboardType*); | 50 bool ConvertBufferType(Buffer, ui::ClipboardType*); |
| 52 ClipboardClient* client_; | 51 RendererClipboardDelegate* const delegate_; |
| 53 }; | 52 }; |
| 54 | 53 |
| 55 } // namespace content | 54 } // namespace content |
| 56 | 55 |
| 57 #endif // CONTENT_RENDERER_WEBCLIPBOARD_IMPL_H_ | 56 #endif // CONTENT_RENDERER_WEBCLIPBOARD_IMPL_H_ |
| OLD | NEW |