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 | 9 |
10 #include "third_party/WebKit/public/platform/WebClipboard.h" | 10 #include "third_party/WebKit/public/platform/WebClipboard.h" |
11 #include "ui/base/clipboard/clipboard.h" | 11 #include "ui/base/clipboard/clipboard.h" |
12 | 12 |
13 #include <string> | 13 #include <string> |
14 | 14 |
15 namespace content { | 15 namespace content { |
16 class ClipboardClient; | 16 class ClipboardClient; |
17 | 17 |
18 class WebClipboardImpl : public WebKit::WebClipboard { | 18 class WebClipboardImpl : public blink::WebClipboard { |
19 public: | 19 public: |
20 explicit WebClipboardImpl(ClipboardClient* client); | 20 explicit WebClipboardImpl(ClipboardClient* client); |
21 | 21 |
22 virtual ~WebClipboardImpl(); | 22 virtual ~WebClipboardImpl(); |
23 | 23 |
24 // WebClipboard methods: | 24 // WebClipboard methods: |
25 virtual uint64 sequenceNumber(Buffer buffer); | 25 virtual uint64 sequenceNumber(Buffer buffer); |
26 virtual bool isFormatAvailable(Format format, Buffer buffer); | 26 virtual bool isFormatAvailable(Format format, Buffer buffer); |
27 virtual WebKit::WebVector<WebKit::WebString> readAvailableTypes( | 27 virtual blink::WebVector<blink::WebString> readAvailableTypes( |
28 Buffer buffer, bool* contains_filenames); | 28 Buffer buffer, bool* contains_filenames); |
29 virtual WebKit::WebString readPlainText(Buffer buffer); | 29 virtual blink::WebString readPlainText(Buffer buffer); |
30 virtual WebKit::WebString readHTML( | 30 virtual blink::WebString readHTML( |
31 Buffer buffer, | 31 Buffer buffer, |
32 WebKit::WebURL* source_url, | 32 blink::WebURL* source_url, |
33 unsigned* fragment_start, | 33 unsigned* fragment_start, |
34 unsigned* fragment_end); | 34 unsigned* fragment_end); |
35 virtual WebKit::WebData readImage(Buffer buffer); | 35 virtual blink::WebData readImage(Buffer buffer); |
36 virtual WebKit::WebString readCustomData( | 36 virtual blink::WebString readCustomData( |
37 Buffer buffer, const WebKit::WebString& type); | 37 Buffer buffer, const blink::WebString& type); |
38 virtual void writePlainText(const WebKit::WebString& plain_text); | 38 virtual void writePlainText(const blink::WebString& plain_text); |
39 virtual void writeHTML( | 39 virtual void writeHTML( |
40 const WebKit::WebString& html_text, | 40 const blink::WebString& html_text, |
41 const WebKit::WebURL& source_url, | 41 const blink::WebURL& source_url, |
42 const WebKit::WebString& plain_text, | 42 const blink::WebString& plain_text, |
43 bool write_smart_paste); | 43 bool write_smart_paste); |
44 virtual void writeImage( | 44 virtual void writeImage( |
45 const WebKit::WebImage& image, | 45 const blink::WebImage& image, |
46 const WebKit::WebURL& source_url, | 46 const blink::WebURL& source_url, |
47 const WebKit::WebString& title); | 47 const blink::WebString& title); |
48 virtual void writeDataObject(const WebKit::WebDragData& data); | 48 virtual void writeDataObject(const blink::WebDragData& data); |
49 | 49 |
50 private: | 50 private: |
51 bool ConvertBufferType(Buffer, ui::ClipboardType*); | 51 bool ConvertBufferType(Buffer, ui::ClipboardType*); |
52 ClipboardClient* client_; | 52 ClipboardClient* client_; |
53 }; | 53 }; |
54 | 54 |
55 } // namespace content | 55 } // namespace content |
56 | 56 |
57 #endif // CONTENT_RENDERER_WEBCLIPBOARD_IMPL_H_ | 57 #endif // CONTENT_RENDERER_WEBCLIPBOARD_IMPL_H_ |
OLD | NEW |