OLD | NEW |
1 // Copyright (c) 2011 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 WEBCLIPBOARD_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_WEBCLIPBOARD_IMPL_H_ |
6 #define 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 #include "third_party/WebKit/public/platform/WebClipboard.h" | 10 #include "third_party/WebKit/public/platform/WebClipboard.h" |
10 #include "ui/base/clipboard/clipboard.h" | 11 #include "ui/base/clipboard/clipboard.h" |
11 #include "webkit/glue/webkit_glue_export.h" | |
12 | 12 |
13 #include <string> | 13 #include <string> |
14 | 14 |
15 namespace webkit_glue { | 15 namespace content { |
16 class ClipboardClient; | 16 class ClipboardClient; |
17 | 17 |
18 class WEBKIT_GLUE_EXPORT WebClipboardImpl : | 18 class WebClipboardImpl : public WebKit::WebClipboard { |
19 NON_EXPORTED_BASE(public WebKit::WebClipboard) { | |
20 public: | 19 public: |
21 static std::string URLToMarkup(const WebKit::WebURL& url, | |
22 const WebKit::WebString& title); | |
23 static std::string URLToImageMarkup(const WebKit::WebURL& url, | |
24 const WebKit::WebString& title); | |
25 | |
26 explicit WebClipboardImpl(ClipboardClient* client); | 20 explicit WebClipboardImpl(ClipboardClient* client); |
27 | 21 |
28 virtual ~WebClipboardImpl(); | 22 virtual ~WebClipboardImpl(); |
29 | 23 |
30 // WebClipboard methods: | 24 // WebClipboard methods: |
31 virtual uint64 getSequenceNumber(); | 25 virtual uint64 getSequenceNumber(); |
32 virtual uint64 sequenceNumber(Buffer buffer); | 26 virtual uint64 sequenceNumber(Buffer buffer); |
33 virtual bool isFormatAvailable(Format format, Buffer buffer); | 27 virtual bool isFormatAvailable(Format format, Buffer buffer); |
34 virtual WebKit::WebVector<WebKit::WebString> readAvailableTypes( | 28 virtual WebKit::WebVector<WebKit::WebString> readAvailableTypes( |
35 Buffer buffer, bool* contains_filenames); | 29 Buffer buffer, bool* contains_filenames); |
(...skipping 19 matching lines...) Expand all Loading... |
55 const WebKit::WebImage& image, | 49 const WebKit::WebImage& image, |
56 const WebKit::WebURL& source_url, | 50 const WebKit::WebURL& source_url, |
57 const WebKit::WebString& title); | 51 const WebKit::WebString& title); |
58 virtual void writeDataObject(const WebKit::WebDragData& data); | 52 virtual void writeDataObject(const WebKit::WebDragData& data); |
59 | 53 |
60 private: | 54 private: |
61 bool ConvertBufferType(Buffer, ui::Clipboard::Buffer*); | 55 bool ConvertBufferType(Buffer, ui::Clipboard::Buffer*); |
62 ClipboardClient* client_; | 56 ClipboardClient* client_; |
63 }; | 57 }; |
64 | 58 |
65 } // namespace webkit_glue | 59 } // namespace content |
66 | 60 |
67 #endif // WEBCLIPBOARD_IMPL_H_ | 61 #endif // CONTENT_RENDERER_WEBCLIPBOARD_IMPL_H_ |
| 62 |
OLD | NEW |