OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 17 matching lines...) Expand all Loading... |
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 #ifndef WebDOMFileSystem_h | 30 #ifndef WebDOMFileSystem_h |
31 #define WebDOMFileSystem_h | 31 #define WebDOMFileSystem_h |
32 | 32 |
33 #include "../platform/WebCommon.h" | 33 #include "../platform/WebCommon.h" |
34 #include "../platform/WebFileSystem.h" | 34 #include "../platform/WebFileSystem.h" |
35 #include "../platform/WebPrivatePtr.h" | 35 #include "../platform/WebPrivatePtr.h" |
36 #include "../platform/WebString.h" | 36 #include "../platform/WebString.h" |
37 #include "../platform/WebURL.h" | 37 #include "../platform/WebURL.h" |
| 38 #include "WebFrame.h" |
38 | 39 |
39 #if BLINK_IMPLEMENTATION | 40 #if BLINK_IMPLEMENTATION |
40 #include "heap/Handle.h" | 41 #include "heap/Handle.h" |
41 #endif | 42 #endif |
42 | 43 |
43 namespace v8 { | 44 namespace v8 { |
44 class Value; | 45 class Value; |
45 template <class T> class Handle; | 46 template <class T> class Handle; |
46 } | 47 } |
47 | 48 |
48 namespace WebCore { class DOMFileSystem; } | 49 namespace WebCore { class DOMFileSystem; } |
49 | 50 |
50 namespace blink { | 51 namespace blink { |
51 | 52 |
52 class WebFrame; | |
53 | |
54 class WebDOMFileSystem { | 53 class WebDOMFileSystem { |
55 public: | 54 public: |
56 enum SerializableType { | 55 enum SerializableType { |
57 SerializableTypeSerializable, | 56 SerializableTypeSerializable, |
58 SerializableTypeNotSerializable, | 57 SerializableTypeNotSerializable, |
59 }; | 58 }; |
60 enum EntryType { | 59 enum EntryType { |
61 EntryTypeFile, | 60 EntryTypeFile, |
62 EntryTypeDirectory, | 61 EntryTypeDirectory, |
63 }; | 62 }; |
64 | 63 |
65 ~WebDOMFileSystem() { reset(); } | 64 ~WebDOMFileSystem() { reset(); } |
66 | 65 |
67 WebDOMFileSystem() { } | 66 WebDOMFileSystem() { } |
68 WebDOMFileSystem(const WebDOMFileSystem& d) { assign(d); } | 67 WebDOMFileSystem(const WebDOMFileSystem& d) { assign(d); } |
69 WebDOMFileSystem& operator=(const WebDOMFileSystem& d) | 68 WebDOMFileSystem& operator=(const WebDOMFileSystem& d) |
70 { | 69 { |
71 assign(d); | 70 assign(d); |
72 return *this; | 71 return *this; |
73 } | 72 } |
74 | 73 |
75 BLINK_EXPORT static WebDOMFileSystem fromV8Value(v8::Handle<v8::Value>); | 74 BLINK_EXPORT static WebDOMFileSystem fromV8Value(v8::Handle<v8::Value>); |
76 | 75 |
77 // FIXME: Deprecate the last argument when all filesystems become | 76 // FIXME: Deprecate the last argument when all filesystems become |
78 // serializable. | 77 // serializable. |
79 BLINK_EXPORT static WebDOMFileSystem create( | 78 BLINK_EXPORT static WebDOMFileSystem create( |
80 WebFrame*, | 79 WebLocalFrame*, |
81 WebFileSystemType, | 80 WebFileSystemType, |
82 const WebString& name, | 81 const WebString& name, |
83 const WebURL& rootURL, | 82 const WebURL& rootURL, |
84 SerializableType = SerializableTypeNotSerializable); | 83 SerializableType = SerializableTypeNotSerializable); |
85 | 84 |
86 BLINK_EXPORT void reset(); | 85 BLINK_EXPORT void reset(); |
87 BLINK_EXPORT void assign(const WebDOMFileSystem&); | 86 BLINK_EXPORT void assign(const WebDOMFileSystem&); |
88 | 87 |
89 BLINK_EXPORT WebString name() const; | 88 BLINK_EXPORT WebString name() const; |
90 BLINK_EXPORT WebFileSystem::Type type() const; | 89 BLINK_EXPORT WebFileSystem::Type type() const; |
(...skipping 11 matching lines...) Expand all Loading... |
102 WebDOMFileSystem& operator=(const PassRefPtrWillBeRawPtr<WebCore::DOMFileSys
tem>&); | 101 WebDOMFileSystem& operator=(const PassRefPtrWillBeRawPtr<WebCore::DOMFileSys
tem>&); |
103 #endif | 102 #endif |
104 | 103 |
105 private: | 104 private: |
106 WebPrivatePtr<WebCore::DOMFileSystem> m_private; | 105 WebPrivatePtr<WebCore::DOMFileSystem> m_private; |
107 }; | 106 }; |
108 | 107 |
109 } // namespace blink | 108 } // namespace blink |
110 | 109 |
111 #endif // WebDOMFileSystem_h | 110 #endif // WebDOMFileSystem_h |
OLD | NEW |