| 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 18 matching lines...) Expand all Loading... |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef WebDragData_h | 31 #ifndef WebDragData_h |
| 32 #define WebDragData_h | 32 #define WebDragData_h |
| 33 | 33 |
| 34 #include "WebCommon.h" | 34 #include "WebCommon.h" |
| 35 #include "WebData.h" | 35 #include "WebData.h" |
| 36 #include "WebString.h" | 36 #include "WebString.h" |
| 37 #include "WebURL.h" | 37 #include "WebURL.h" |
| 38 | 38 |
| 39 namespace blink { class DataObject; } | |
| 40 | |
| 41 namespace blink { | 39 namespace blink { |
| 42 | 40 |
| 41 class DataObject; |
| 43 class WebDragDataPrivate; | 42 class WebDragDataPrivate; |
| 44 template <typename T> class WebVector; | 43 template <typename T> class WebVector; |
| 45 | 44 |
| 46 // Holds data that may be exchanged through a drag-n-drop operation. It is | 45 // Holds data that may be exchanged through a drag-n-drop operation. It is |
| 47 // inexpensive to copy a WebDragData object. | 46 // inexpensive to copy a WebDragData object. |
| 48 class WebDragData { | 47 class WebDragData { |
| 49 public: | 48 public: |
| 50 struct Item { | 49 struct Item { |
| 51 enum StorageType { | 50 enum StorageType { |
| 52 // String data with an associated MIME type. Depending on the MIME t
ype, there may be | 51 // String data with an associated MIME type. Depending on the MIME t
ype, there may be |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 BLINK_EXPORT void assign(const WebDragData&); | 101 BLINK_EXPORT void assign(const WebDragData&); |
| 103 | 102 |
| 104 BLINK_EXPORT WebVector<Item> items() const; | 103 BLINK_EXPORT WebVector<Item> items() const; |
| 105 BLINK_EXPORT void setItems(const WebVector<Item>&); | 104 BLINK_EXPORT void setItems(const WebVector<Item>&); |
| 106 BLINK_EXPORT void addItem(const Item&); | 105 BLINK_EXPORT void addItem(const Item&); |
| 107 | 106 |
| 108 BLINK_EXPORT WebString filesystemId() const; | 107 BLINK_EXPORT WebString filesystemId() const; |
| 109 BLINK_EXPORT void setFilesystemId(const WebString&); | 108 BLINK_EXPORT void setFilesystemId(const WebString&); |
| 110 | 109 |
| 111 #if BLINK_IMPLEMENTATION | 110 #if BLINK_IMPLEMENTATION |
| 112 explicit WebDragData(const PassRefPtrWillBeRawPtr<blink::DataObject>&); | 111 explicit WebDragData(const PassRefPtrWillBeRawPtr<DataObject>&); |
| 113 WebDragData& operator=(const PassRefPtrWillBeRawPtr<blink::DataObject>&); | 112 WebDragData& operator=(const PassRefPtrWillBeRawPtr<DataObject>&); |
| 114 blink::DataObject* getValue() const; | 113 DataObject* getValue() const; |
| 115 #endif | 114 #endif |
| 116 | 115 |
| 117 private: | 116 private: |
| 118 void ensureMutable(); | 117 void ensureMutable(); |
| 119 WebPrivatePtr<blink::DataObject> m_private; | 118 WebPrivatePtr<DataObject> m_private; |
| 120 }; | 119 }; |
| 121 | 120 |
| 122 } // namespace blink | 121 } // namespace blink |
| 123 | 122 |
| 124 #endif | 123 #endif |
| OLD | NEW |