| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 23 matching lines...) Expand all Loading... |
| 34 #include "core/CoreExport.h" | 34 #include "core/CoreExport.h" |
| 35 #include "platform/bindings/ScriptWrappable.h" | 35 #include "platform/bindings/ScriptWrappable.h" |
| 36 #include "platform/heap/Handle.h" | 36 #include "platform/heap/Handle.h" |
| 37 #include "platform/wtf/Forward.h" | 37 #include "platform/wtf/Forward.h" |
| 38 | 38 |
| 39 namespace blink { | 39 namespace blink { |
| 40 | 40 |
| 41 class DataObjectItem; | 41 class DataObjectItem; |
| 42 class DataTransfer; | 42 class DataTransfer; |
| 43 class File; | 43 class File; |
| 44 class FunctionStringCallback; |
| 44 class ScriptState; | 45 class ScriptState; |
| 45 class StringCallback; | |
| 46 | 46 |
| 47 class CORE_EXPORT DataTransferItem final | 47 class CORE_EXPORT DataTransferItem final |
| 48 : public GarbageCollected<DataTransferItem>, | 48 : public GarbageCollected<DataTransferItem>, |
| 49 public ScriptWrappable { | 49 public ScriptWrappable { |
| 50 DEFINE_WRAPPERTYPEINFO(); | 50 DEFINE_WRAPPERTYPEINFO(); |
| 51 WTF_MAKE_NONCOPYABLE(DataTransferItem); | 51 WTF_MAKE_NONCOPYABLE(DataTransferItem); |
| 52 | 52 |
| 53 public: | 53 public: |
| 54 static DataTransferItem* Create(DataTransfer*, DataObjectItem*); | 54 static DataTransferItem* Create(DataTransfer*, DataObjectItem*); |
| 55 | 55 |
| 56 String kind() const; | 56 String kind() const; |
| 57 String type() const; | 57 String type() const; |
| 58 | 58 |
| 59 void getAsString(ScriptState*, StringCallback*) const; | 59 void getAsString(ScriptState*, FunctionStringCallback*) const; |
| 60 File* getAsFile() const; | 60 File* getAsFile() const; |
| 61 | 61 |
| 62 DataTransfer* GetDataTransfer() { return data_transfer_.Get(); } | 62 DataTransfer* GetDataTransfer() { return data_transfer_.Get(); } |
| 63 DataObjectItem* GetDataObjectItem() { return item_.Get(); } | 63 DataObjectItem* GetDataObjectItem() { return item_.Get(); } |
| 64 | 64 |
| 65 DECLARE_TRACE(); | 65 DECLARE_TRACE(); |
| 66 | 66 |
| 67 private: | 67 private: |
| 68 DataTransferItem(DataTransfer*, DataObjectItem*); | 68 DataTransferItem(DataTransfer*, DataObjectItem*); |
| 69 | 69 |
| 70 Member<DataTransfer> data_transfer_; | 70 Member<DataTransfer> data_transfer_; |
| 71 Member<DataObjectItem> item_; | 71 Member<DataObjectItem> item_; |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 } // namespace blink | 74 } // namespace blink |
| 75 | 75 |
| 76 #endif // DataTransferItem_h | 76 #endif // DataTransferItem_h |
| OLD | NEW |