Chromium Code Reviews| Index: third_party/WebKit/Source/core/clipboard/DataTransfer.h |
| diff --git a/third_party/WebKit/Source/core/clipboard/DataTransfer.h b/third_party/WebKit/Source/core/clipboard/DataTransfer.h |
| index 18a2b2f3f3db0858372f5702a2204401109d4176..10d933c411f22537d6217f3a9b40e087d092f35b 100644 |
| --- a/third_party/WebKit/Source/core/clipboard/DataTransfer.h |
| +++ b/third_party/WebKit/Source/core/clipboard/DataTransfer.h |
| @@ -26,6 +26,7 @@ |
| #include <memory> |
| #include "core/CoreExport.h" |
| +#include "core/clipboard/DataObject.h" |
| #include "core/clipboard/DataTransferAccessPolicy.h" |
| #include "core/loader/resource/ImageResourceContent.h" |
| #include "core/page/DragActions.h" |
| @@ -36,7 +37,6 @@ |
| namespace blink { |
| -class DataObject; |
| class DataTransferItemList; |
| class DragImage; |
| class Element; |
| @@ -52,7 +52,9 @@ class Node; |
| // http://dev.w3.org/2006/webapi/clipops/clipops.html |
| class CORE_EXPORT DataTransfer final |
| : public GarbageCollectedFinalized<DataTransfer>, |
| - public ScriptWrappable { |
| + public ScriptWrappable, |
| + public DataObject::Observer { |
| + USING_GARBAGE_COLLECTED_MIXIN(DataTransfer); |
| DEFINE_WRAPPERTYPEINFO(); |
| public: |
| @@ -87,8 +89,10 @@ class CORE_EXPORT DataTransfer final |
| String getData(const String& type) const; |
| void setData(const String& type, const String& data); |
| - // extensions beyond IE's API |
| - Vector<String> types() const; |
| + // Used by the bindings code to determine whether to call types() again. |
| + bool hasDataStoreItemListChanged() const; |
| + |
| + Vector<String> types(); |
| FileList* files() const; |
| IntPoint DragLocation() const { return drag_loc_; } |
| @@ -138,6 +142,9 @@ class CORE_EXPORT DataTransfer final |
| bool HasFileOfType(const String&) const; |
| bool HasStringOfType(const String&) const; |
| + // DataObject::Observer override. |
| + void OnItemListChanged(); |
|
jsbell
2017/05/15 20:49:29
Mark with `override`
Raphael Kubo da Costa (rakuco)
2017/05/16 08:51:51
Done.
|
| + |
| // Instead of using this member directly, prefer to use the can*() methods |
| // above. |
| DataTransferAccessPolicy policy_; |
| @@ -146,6 +153,8 @@ class CORE_EXPORT DataTransfer final |
| DataTransferType transfer_type_; |
| Member<DataObject> data_object_; |
| + bool data_store_item_list_changed_; |
| + |
| IntPoint drag_loc_; |
| Member<ImageResourceContent> drag_image_; |
| Member<Node> drag_image_element_; |