| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2006 Apple Computer, 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 WTF_MAKE_NONCOPYABLE(Pasteboard); WTF_MAKE_FAST_ALLOCATED(Pasteboard); | 42 WTF_MAKE_NONCOPYABLE(Pasteboard); WTF_MAKE_FAST_ALLOCATED(Pasteboard); |
| 43 public: | 43 public: |
| 44 enum SmartReplaceOption { | 44 enum SmartReplaceOption { |
| 45 CanSmartReplace, | 45 CanSmartReplace, |
| 46 CannotSmartReplace | 46 CannotSmartReplace |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 static Pasteboard* generalPasteboard(); | 49 static Pasteboard* generalPasteboard(); |
| 50 void writePlainText(const String&, SmartReplaceOption); | 50 void writePlainText(const String&, SmartReplaceOption); |
| 51 void writeImage(Image*, const KURL&, const String& title); | 51 void writeImage(Image*, const KURL&, const String& title); |
| 52 void writeDataObject(PassRefPtrWillBeRawPtr<DataObject>); | 52 void writeDataObject(DataObject*); |
| 53 bool canSmartReplace(); | 53 bool canSmartReplace(); |
| 54 bool isHTMLAvailable(); | 54 bool isHTMLAvailable(); |
| 55 String plainText(); | 55 String plainText(); |
| 56 | 56 |
| 57 // If no data is read, an empty string will be returned and all out paramete
rs will be cleared. | 57 // If no data is read, an empty string will be returned and all out paramete
rs will be cleared. |
| 58 // If applicable, the page URL will be assigned to the KURL parameter. | 58 // If applicable, the page URL will be assigned to the KURL parameter. |
| 59 // fragmentStart and fragmentEnd are indexes into the returned markup that i
ndicate | 59 // fragmentStart and fragmentEnd are indexes into the returned markup that i
ndicate |
| 60 // the start and end of the returned markup. If there is no additional conte
xt, | 60 // the start and end of the returned markup. If there is no additional conte
xt, |
| 61 // fragmentStart will be zero and fragmentEnd will be the same as the length
of the markup. | 61 // fragmentStart will be zero and fragmentEnd will be the same as the length
of the markup. |
| 62 String readHTML(KURL&, unsigned& fragmentStart, unsigned& fragmentEnd); | 62 String readHTML(KURL&, unsigned& fragmentStart, unsigned& fragmentEnd); |
| 63 | 63 |
| 64 void writeHTML(const String& markup, const KURL& documentURL, const String&
plainText, bool canSmartCopyOrDelete); | 64 void writeHTML(const String& markup, const KURL& documentURL, const String&
plainText, bool canSmartCopyOrDelete); |
| 65 | 65 |
| 66 bool isSelectionMode() const; | 66 bool isSelectionMode() const; |
| 67 void setSelectionMode(bool); | 67 void setSelectionMode(bool); |
| 68 | 68 |
| 69 blink::WebClipboard::Buffer buffer() const { return m_buffer; } | 69 blink::WebClipboard::Buffer buffer() const { return m_buffer; } |
| 70 | 70 |
| 71 private: | 71 private: |
| 72 Pasteboard(); | 72 Pasteboard(); |
| 73 | 73 |
| 74 blink::WebClipboard::Buffer m_buffer; | 74 blink::WebClipboard::Buffer m_buffer; |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 } // namespace blink | 77 } // namespace blink |
| 78 | 78 |
| 79 #endif // Pasteboard_h | 79 #endif // Pasteboard_h |
| OLD | NEW |