OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 WEBCLIPBOARD_IMPL_H_ |
6 #define WEBCLIPBOARD_IMPL_H_ | 6 #define WEBCLIPBOARD_IMPL_H_ |
7 | 7 |
8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebClipboard.h" | 8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebClipboard.h" |
9 #include "ui/base/clipboard/clipboard.h" | 9 #include "ui/base/clipboard/clipboard.h" |
10 | 10 |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 namespace webkit_glue { | 13 namespace webkit_glue { |
14 | 14 |
15 class WebClipboardImpl : public WebKit::WebClipboard { | 15 class WebClipboardImpl : public WebKit::WebClipboard { |
16 public: | 16 public: |
17 static std::string URLToMarkup(const WebKit::WebURL& url, | 17 static std::string URLToMarkup(const WebKit::WebURL& url, |
18 const WebKit::WebString& title); | 18 const WebKit::WebString& title); |
19 static std::string URLToImageMarkup(const WebKit::WebURL& url, | 19 static std::string URLToImageMarkup(const WebKit::WebURL& url, |
20 const WebKit::WebString& title); | 20 const WebKit::WebString& title); |
21 | 21 |
22 virtual ~WebClipboardImpl(); | 22 virtual ~WebClipboardImpl(); |
23 | 23 |
24 // WebClipboard methods: | 24 // WebClipboard methods: |
25 virtual bool isFormatAvailable(Format, Buffer); | 25 virtual bool isFormatAvailable(Format, Buffer); |
26 virtual WebKit::WebString readPlainText(Buffer); | 26 virtual WebKit::WebString readPlainText(Buffer); |
27 // TODO(dcheng): This method is deprecated and scheduled to be removed. | |
28 virtual WebKit::WebString readHTML( | |
29 Buffer, | |
30 WebKit::WebURL* source_url); | |
31 virtual WebKit::WebString readHTML( | 27 virtual WebKit::WebString readHTML( |
32 Buffer, | 28 Buffer, |
33 WebKit::WebURL* source_url, | 29 WebKit::WebURL* source_url, |
34 unsigned* fragment_start, | 30 unsigned* fragment_start, |
35 unsigned* fragment_end); | 31 unsigned* fragment_end); |
36 virtual WebKit::WebData readImage(Buffer); | 32 virtual WebKit::WebData readImage(Buffer); |
37 virtual uint64 getSequenceNumber(); | 33 virtual uint64 getSequenceNumber(); |
38 virtual void writeHTML( | 34 virtual void writeHTML( |
39 const WebKit::WebString& html_text, | 35 const WebKit::WebString& html_text, |
40 const WebKit::WebURL& source_url, | 36 const WebKit::WebURL& source_url, |
(...skipping 18 matching lines...) Expand all Loading... |
59 WebKit::WebString* data, WebKit::WebString* metadata); | 55 WebKit::WebString* data, WebKit::WebString* metadata); |
60 virtual WebKit::WebVector<WebKit::WebString> readFilenames(Buffer); | 56 virtual WebKit::WebVector<WebKit::WebString> readFilenames(Buffer); |
61 | 57 |
62 private: | 58 private: |
63 bool ConvertBufferType(Buffer, ui::Clipboard::Buffer*); | 59 bool ConvertBufferType(Buffer, ui::Clipboard::Buffer*); |
64 }; | 60 }; |
65 | 61 |
66 } // namespace webkit_glue | 62 } // namespace webkit_glue |
67 | 63 |
68 #endif // WEBCLIPBOARD_IMPL_H_ | 64 #endif // WEBCLIPBOARD_IMPL_H_ |
OLD | NEW |