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 <stdint.h> |
| 9 |
| 10 #include <string> |
| 11 |
8 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
9 #include "third_party/WebKit/public/platform/WebClipboard.h" | 13 #include "third_party/WebKit/public/platform/WebClipboard.h" |
10 #include "ui/base/clipboard/clipboard.h" | 14 #include "ui/base/clipboard/clipboard.h" |
11 | 15 |
12 #include <string> | |
13 | |
14 namespace content { | 16 namespace content { |
15 class RendererClipboardDelegate; | 17 class RendererClipboardDelegate; |
16 | 18 |
17 class WebClipboardImpl : public blink::WebClipboard { | 19 class WebClipboardImpl : public blink::WebClipboard { |
18 public: | 20 public: |
19 explicit WebClipboardImpl(RendererClipboardDelegate* delegate); | 21 explicit WebClipboardImpl(RendererClipboardDelegate* delegate); |
20 | 22 |
21 virtual ~WebClipboardImpl(); | 23 virtual ~WebClipboardImpl(); |
22 | 24 |
23 // WebClipboard methods: | 25 // WebClipboard methods: |
24 uint64 sequenceNumber(Buffer buffer) override; | 26 uint64_t sequenceNumber(Buffer buffer) override; |
25 bool isFormatAvailable(Format format, Buffer buffer) override; | 27 bool isFormatAvailable(Format format, Buffer buffer) override; |
26 blink::WebVector<blink::WebString> readAvailableTypes( | 28 blink::WebVector<blink::WebString> readAvailableTypes( |
27 Buffer buffer, | 29 Buffer buffer, |
28 bool* contains_filenames) override; | 30 bool* contains_filenames) override; |
29 blink::WebString readPlainText(Buffer buffer) override; | 31 blink::WebString readPlainText(Buffer buffer) override; |
30 blink::WebString readHTML(Buffer buffer, | 32 blink::WebString readHTML(Buffer buffer, |
31 blink::WebURL* source_url, | 33 blink::WebURL* source_url, |
32 unsigned* fragment_start, | 34 unsigned* fragment_start, |
33 unsigned* fragment_end) override; | 35 unsigned* fragment_end) override; |
34 blink::WebData readImage(Buffer buffer) override; | 36 blink::WebData readImage(Buffer buffer) override; |
(...skipping 10 matching lines...) Expand all Loading... |
45 void writeDataObject(const blink::WebDragData& data) override; | 47 void writeDataObject(const blink::WebDragData& data) override; |
46 | 48 |
47 private: | 49 private: |
48 bool ConvertBufferType(Buffer, ui::ClipboardType*); | 50 bool ConvertBufferType(Buffer, ui::ClipboardType*); |
49 RendererClipboardDelegate* const delegate_; | 51 RendererClipboardDelegate* const delegate_; |
50 }; | 52 }; |
51 | 53 |
52 } // namespace content | 54 } // namespace content |
53 | 55 |
54 #endif // CONTENT_RENDERER_WEBCLIPBOARD_IMPL_H_ | 56 #endif // CONTENT_RENDERER_WEBCLIPBOARD_IMPL_H_ |
OLD | NEW |