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

Side by Side Diff: third_party/WebKit/Source/modules/filesystem/DraggedIsolatedFileSystemImpl.h

Issue 2582463002: Fix webkitGetEntry for non-native files. (Closed)
Patch Set: . 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 16 matching lines...) Expand all
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef DraggedIsolatedFileSystemImpl_h 31 #ifndef DraggedIsolatedFileSystemImpl_h
32 #define DraggedIsolatedFileSystemImpl_h 32 #define DraggedIsolatedFileSystemImpl_h
33 33
34 #include "core/clipboard/DataObject.h" 34 #include "core/clipboard/DataObject.h"
35 #include "core/clipboard/DraggedIsolatedFileSystem.h" 35 #include "core/clipboard/DraggedIsolatedFileSystem.h"
36 #include "platform/heap/Handle.h" 36 #include "platform/heap/Handle.h"
37 #include "platform/heap/HeapAllocator.h"
37 #include "wtf/Forward.h" 38 #include "wtf/Forward.h"
38 #include "wtf/text/WTFString.h" 39 #include "wtf/text/WTFString.h"
39 40
40 namespace blink { 41 namespace blink {
41 42
42 class DOMFileSystem; 43 class DOMFileSystem;
43 44
44 class DraggedIsolatedFileSystemImpl final 45 class DraggedIsolatedFileSystemImpl final
45 : public GarbageCollectedFinalized<DraggedIsolatedFileSystemImpl>, 46 : public GarbageCollectedFinalized<DraggedIsolatedFileSystemImpl>,
46 public DraggedIsolatedFileSystem, 47 public DraggedIsolatedFileSystem,
47 public Supplement<DataObject> { 48 public Supplement<DataObject> {
48 USING_GARBAGE_COLLECTED_MIXIN(DraggedIsolatedFileSystemImpl); 49 USING_GARBAGE_COLLECTED_MIXIN(DraggedIsolatedFileSystemImpl);
49 50
50 public: 51 public:
51 static DraggedIsolatedFileSystemImpl* create(DataObject& host, 52 static DOMFileSystem* getDOMFileSystem(DataObject* host,
52 const String& filesystemId) { 53 ExecutionContext*,
53 return new DraggedIsolatedFileSystemImpl(host, filesystemId); 54 const DataObjectItem&);
54 }
55
56 static DOMFileSystem* getDOMFileSystem(DataObject* host, ExecutionContext*);
57 55
58 static const char* supplementName(); 56 static const char* supplementName();
59 static DraggedIsolatedFileSystemImpl* from(DataObject*); 57 static DraggedIsolatedFileSystemImpl* from(DataObject*);
60 58
61 DECLARE_TRACE(); 59 DECLARE_TRACE();
62 60
63 static void prepareForDataObject(DataObject*, const String& filesystemId); 61 static void prepareForDataObject(DataObject*);
64 62
65 private: 63 private:
66 DraggedIsolatedFileSystemImpl(DataObject& host, const String& filesystemId); 64 DraggedIsolatedFileSystemImpl() = default;
67 65
68 Member<DOMFileSystem> m_filesystem; 66 HeapHashMap<String, Member<DOMFileSystem>> m_filesystems;
69 }; 67 };
70 68
71 } // namespace blink 69 } // namespace blink
72 70
73 #endif // DraggedIsolatedFileSystemImpl_h 71 #endif // DraggedIsolatedFileSystemImpl_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698