OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this |
2 // source code is governed by a BSD-style license that can be found in the | 2 // source code is governed by a BSD-style license that can be found in the |
3 // LICENSE file. | 3 // 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 "app/clipboard/clipboard.h" | 8 #include "app/clipboard/clipboard.h" |
9 #include "third_party/WebKit/WebKit/chromium/public/WebClipboard.h" | 9 #include "third_party/WebKit/WebKit/chromium/public/WebClipboard.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 virtual WebKit::WebString readHTML(Buffer, WebKit::WebURL* source_url); | 27 virtual WebKit::WebString readHTML(Buffer, WebKit::WebURL* source_url); |
28 virtual void writeHTML( | 28 virtual void writeHTML( |
29 const WebKit::WebString& html_text, | 29 const WebKit::WebString& html_text, |
30 const WebKit::WebURL& source_url, | 30 const WebKit::WebURL& source_url, |
31 const WebKit::WebString& plain_text, | 31 const WebKit::WebString& plain_text, |
32 bool write_smart_paste); | 32 bool write_smart_paste); |
(...skipping 13 matching lines...) Expand all Loading... |
46 WebKit::WebString* data, WebKit::WebString* metadata); | 46 WebKit::WebString* data, WebKit::WebString* metadata); |
47 virtual WebKit::WebVector<WebKit::WebString> readFilenames(Buffer); | 47 virtual WebKit::WebVector<WebKit::WebString> readFilenames(Buffer); |
48 | 48 |
49 private: | 49 private: |
50 bool ConvertBufferType(Buffer, Clipboard::Buffer*); | 50 bool ConvertBufferType(Buffer, Clipboard::Buffer*); |
51 }; | 51 }; |
52 | 52 |
53 } // namespace webkit_glue | 53 } // namespace webkit_glue |
54 | 54 |
55 #endif // WEBCLIPBOARD_IMPL_H_ | 55 #endif // WEBCLIPBOARD_IMPL_H_ |
OLD | NEW |