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

Side by Side Diff: third_party/WebKit/Source/core/clipboard/DataObject.h

Issue 2565283002: Fix webkitGetEntry for non-native files. (Closed)
Patch Set: Rebased. Created 4 years 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2008, 2009, Google Inc. All rights reserved. 2 * Copyright (c) 2008, 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 // DataTransferItemList support. 65 // DataTransferItemList support.
66 size_t length() const; 66 size_t length() const;
67 DataObjectItem* item(unsigned long index); 67 DataObjectItem* item(unsigned long index);
68 // FIXME: Implement V8DataTransferItemList::indexedPropertyDeleter to get this 68 // FIXME: Implement V8DataTransferItemList::indexedPropertyDeleter to get this
69 // called. 69 // called.
70 void deleteItem(unsigned long index); 70 void deleteItem(unsigned long index);
71 void clearAll(); 71 void clearAll();
72 // Returns null if an item already exists with the provided type. 72 // Returns null if an item already exists with the provided type.
73 DataObjectItem* add(const String& data, const String& type); 73 DataObjectItem* add(const String& data, const String& type);
74 DataObjectItem* add(File*); 74 DataObjectItem* add(File*);
75 DataObjectItem* add(File*, const String& fileSystemId);
75 76
76 // WebCore helpers. 77 // WebCore helpers.
77 void clearData(const String& type); 78 void clearData(const String& type);
78 79
79 Vector<String> types() const; 80 Vector<String> types() const;
80 String getData(const String& type) const; 81 String getData(const String& type) const;
81 void setData(const String& type, const String& data); 82 void setData(const String& type, const String& data);
82 83
83 void urlAndTitle(String& url, String* title = 0) const; 84 void urlAndTitle(String& url, String* title = 0) const;
84 void setURLAndTitle(const String& url, const String& title); 85 void setURLAndTitle(const String& url, const String& title);
85 void htmlAndBaseURL(String& html, KURL& baseURL) const; 86 void htmlAndBaseURL(String& html, KURL& baseURL) const;
86 void setHTMLAndBaseURL(const String& html, const KURL& baseURL); 87 void setHTMLAndBaseURL(const String& html, const KURL& baseURL);
87 88
88 // Used for dragging in files from the desktop. 89 // Used for dragging in files from the desktop.
89 bool containsFilenames() const; 90 bool containsFilenames() const;
90 Vector<String> filenames() const; 91 Vector<String> filenames() const;
91 void addFilename(const String& filename, const String& displayName); 92 void addFilename(const String& filename,
93 const String& displayName,
94 const String& fileSystemId);
92 95
93 // Used for dragging in filesystem from the desktop. 96 // Used for dragging in filesystem from the desktop.
94 void setFilesystemId(const String& fileSystemId) { 97 void setFilesystemId(const String& fileSystemId) {
95 m_filesystemId = fileSystemId; 98 m_filesystemId = fileSystemId;
96 } 99 }
97 const String& filesystemId() const { 100 const String& filesystemId() const {
98 ASSERT(!m_filesystemId.isEmpty()); 101 ASSERT(!m_filesystemId.isEmpty());
99 return m_filesystemId; 102 return m_filesystemId;
100 } 103 }
101 104
(...skipping 17 matching lines...) Expand all
119 HeapVector<Member<DataObjectItem>> m_itemList; 122 HeapVector<Member<DataObjectItem>> m_itemList;
120 123
121 // State of Shift/Ctrl/Alt/Meta keys and Left/Right/Middle mouse buttons 124 // State of Shift/Ctrl/Alt/Meta keys and Left/Right/Middle mouse buttons
122 int m_modifiers; 125 int m_modifiers;
123 String m_filesystemId; 126 String m_filesystemId;
124 }; 127 };
125 128
126 } // namespace blink 129 } // namespace blink
127 130
128 #endif 131 #endif
OLDNEW
« no previous file with comments | « content/renderer/render_widget.cc ('k') | third_party/WebKit/Source/core/clipboard/DataObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698