Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(234)

Unified Diff: third_party/WebKit/Source/core/clipboard/DataTransfer.h

Issue 2875013002: DataTransfer: Make |types| be a FrozenArray<DOMString>. (Closed)
Patch Set: Fix win_chromium_compile_dbg_ng Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..e9f8cced8d5746ed6b1e10bde1ffab7eae1a889a 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() override;
+
// 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_;
« no previous file with comments | « third_party/WebKit/Source/core/clipboard/DataObjectTest.cpp ('k') | third_party/WebKit/Source/core/clipboard/DataTransfer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698