| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 WEBKIT_GLUE_CLIPBOARD_CLIENT_H_ | 5 #ifndef WEBKIT_GLUE_CLIPBOARD_CLIENT_H_ |
| 6 #define WEBKIT_GLUE_CLIPBOARD_CLIENT_H_ | 6 #define WEBKIT_GLUE_CLIPBOARD_CLIENT_H_ |
| 7 | 7 |
| 8 #include "ui/base/clipboard/clipboard.h" | 8 #include "ui/base/clipboard/clipboard.h" |
| 9 | 9 |
| 10 class GURL; | 10 class GURL; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 // Tests whether the clipboard contains a certain format | 38 // Tests whether the clipboard contains a certain format |
| 39 virtual bool IsFormatAvailable(const ui::Clipboard::FormatType& format, | 39 virtual bool IsFormatAvailable(const ui::Clipboard::FormatType& format, |
| 40 ui::Clipboard::Buffer buffer) = 0; | 40 ui::Clipboard::Buffer buffer) = 0; |
| 41 | 41 |
| 42 // Clear the contents of the clipboard. | 42 // Clear the contents of the clipboard. |
| 43 virtual void Clear(ui::Clipboard::Buffer buffer) = 0; | 43 virtual void Clear(ui::Clipboard::Buffer buffer) = 0; |
| 44 | 44 |
| 45 // Reads the available types from the clipboard, if available. | 45 // Reads the available types from the clipboard, if available. |
| 46 virtual void ReadAvailableTypes(ui::Clipboard::Buffer buffer, | 46 virtual void ReadAvailableTypes(ui::Clipboard::Buffer buffer, |
| 47 std::vector<string16>* types, | 47 std::vector<base::string16>* types, |
| 48 bool* contains_filenames) = 0; | 48 bool* contains_filenames) = 0; |
| 49 | 49 |
| 50 // Reads UNICODE text from the clipboard, if available. | 50 // Reads UNICODE text from the clipboard, if available. |
| 51 virtual void ReadText(ui::Clipboard::Buffer buffer, string16* result) = 0; | 51 virtual void ReadText(ui::Clipboard::Buffer buffer, |
| 52 base::string16* result) = 0; |
| 52 | 53 |
| 53 // Reads ASCII text from the clipboard, if available. | 54 // Reads ASCII text from the clipboard, if available. |
| 54 virtual void ReadAsciiText(ui::Clipboard::Buffer buffer, | 55 virtual void ReadAsciiText(ui::Clipboard::Buffer buffer, |
| 55 std::string* result) = 0; | 56 std::string* result) = 0; |
| 56 | 57 |
| 57 // Reads HTML from the clipboard, if available. | 58 // Reads HTML from the clipboard, if available. |
| 58 virtual void ReadHTML(ui::Clipboard::Buffer buffer, string16* markup, | 59 virtual void ReadHTML(ui::Clipboard::Buffer buffer, base::string16* markup, |
| 59 GURL* url, uint32* fragment_start, | 60 GURL* url, uint32* fragment_start, |
| 60 uint32* fragment_end) = 0; | 61 uint32* fragment_end) = 0; |
| 61 | 62 |
| 62 // Reads RTF from the clipboard, if available. | 63 // Reads RTF from the clipboard, if available. |
| 63 virtual void ReadRTF(ui::Clipboard::Buffer buffer, std::string* result) = 0; | 64 virtual void ReadRTF(ui::Clipboard::Buffer buffer, std::string* result) = 0; |
| 64 | 65 |
| 65 // Reads and image from the clipboard, if available. | 66 // Reads and image from the clipboard, if available. |
| 66 virtual void ReadImage(ui::Clipboard::Buffer buffer, std::string* data) = 0; | 67 virtual void ReadImage(ui::Clipboard::Buffer buffer, std::string* data) = 0; |
| 67 | 68 |
| 68 // Reads a custom data type from the clipboard, if available. | 69 // Reads a custom data type from the clipboard, if available. |
| 69 virtual void ReadCustomData(ui::Clipboard::Buffer buffer, | 70 virtual void ReadCustomData(ui::Clipboard::Buffer buffer, |
| 70 const string16& type, | 71 const base::string16& type, |
| 71 string16* data) = 0; | 72 base::string16* data) = 0; |
| 72 | 73 |
| 73 // Reads raw data from the clipboard for a given format. | 74 // Reads raw data from the clipboard for a given format. |
| 74 virtual void ReadData(const ui::Clipboard::FormatType& format, | 75 virtual void ReadData(const ui::Clipboard::FormatType& format, |
| 75 std::string* data) = 0; | 76 std::string* data) = 0; |
| 76 | 77 |
| 77 // Creates a context to write clipboard data. May return NULL. | 78 // Creates a context to write clipboard data. May return NULL. |
| 78 virtual WriteContext* CreateWriteContext() = 0; | 79 virtual WriteContext* CreateWriteContext() = 0; |
| 79 }; | 80 }; |
| 80 | 81 |
| 81 } // namespace webkit_glue | 82 } // namespace webkit_glue |
| 82 | 83 |
| 83 #endif // WEBKIT_GLUE_CLIPBOARD_CLIENT_H_ | 84 #endif // WEBKIT_GLUE_CLIPBOARD_CLIENT_H_ |
| OLD | NEW |