OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 13 matching lines...) Expand all Loading... |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef WebClipboard_h | 31 #ifndef WebClipboard_h |
32 #define WebClipboard_h | 32 #define WebClipboard_h |
33 | 33 |
34 #include "WebCommon.h" | 34 #include "public/platform/WebBlobInfo.h" |
35 #include "WebData.h" | 35 #include "public/platform/WebCommon.h" |
36 #include "WebImage.h" | 36 #include "public/platform/WebImage.h" |
37 #include "WebString.h" | 37 #include "public/platform/WebString.h" |
38 #include "WebURL.h" | 38 #include "public/platform/WebURL.h" |
39 #include "WebVector.h" | 39 #include "public/platform/WebVector.h" |
40 | 40 |
41 namespace blink { | 41 namespace blink { |
42 | 42 |
43 class WebDragData; | 43 class WebDragData; |
44 class WebImage; | 44 class WebImage; |
45 class WebURL; | 45 class WebURL; |
46 | 46 |
47 class WebClipboard { | 47 class WebClipboard { |
48 public: | 48 public: |
49 enum Format { | 49 enum Format { |
(...skipping 20 matching lines...) Expand all Loading... |
70 Buffer, bool* containsFilenames) { return WebVector<WebString>(); } | 70 Buffer, bool* containsFilenames) { return WebVector<WebString>(); } |
71 virtual WebString readPlainText(Buffer) { return WebString(); } | 71 virtual WebString readPlainText(Buffer) { return WebString(); } |
72 // fragmentStart and fragmentEnd are indexes into the returned markup that | 72 // fragmentStart and fragmentEnd are indexes into the returned markup that |
73 // indicate the start and end of the fragment if the returned markup | 73 // indicate the start and end of the fragment if the returned markup |
74 // contains additional context. If there is no additional context, | 74 // contains additional context. If there is no additional context, |
75 // fragmentStart will be zero and fragmentEnd will be the same as the length | 75 // fragmentStart will be zero and fragmentEnd will be the same as the length |
76 // of the returned markup. | 76 // of the returned markup. |
77 virtual WebString readHTML( | 77 virtual WebString readHTML( |
78 Buffer buffer, WebURL* pageURL, unsigned* fragmentStart, | 78 Buffer buffer, WebURL* pageURL, unsigned* fragmentStart, |
79 unsigned* fragmentEnd) { return WebString(); } | 79 unsigned* fragmentEnd) { return WebString(); } |
80 virtual WebData readImage(Buffer) { return WebData(); } | 80 virtual WebBlobInfo readImage(Buffer) { return WebBlobInfo(); } |
81 virtual WebString readCustomData( | 81 virtual WebString readCustomData( |
82 Buffer, const WebString& type) { return WebString(); } | 82 Buffer, const WebString& type) { return WebString(); } |
83 | 83 |
84 virtual void writePlainText(const WebString&) { } | 84 virtual void writePlainText(const WebString&) { } |
85 virtual void writeHTML( | 85 virtual void writeHTML( |
86 const WebString& htmlText, const WebURL&, | 86 const WebString& htmlText, const WebURL&, |
87 const WebString& plainText, bool writeSmartPaste) { } | 87 const WebString& plainText, bool writeSmartPaste) { } |
88 virtual void writeImage( | 88 virtual void writeImage( |
89 const WebImage&, const WebURL&, const WebString& title) { } | 89 const WebImage&, const WebURL&, const WebString& title) { } |
90 virtual void writeDataObject(const WebDragData&) { } | 90 virtual void writeDataObject(const WebDragData&) { } |
91 | 91 |
92 protected: | 92 protected: |
93 ~WebClipboard() { } | 93 ~WebClipboard() { } |
94 }; | 94 }; |
95 | 95 |
96 } // namespace blink | 96 } // namespace blink |
97 | 97 |
98 #endif | 98 #endif |
OLD | NEW |