OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 13 matching lines...) Expand all Loading... |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
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 FileWriter_h | 31 #ifndef FileWriter_h |
32 #define FileWriter_h | 32 #define FileWriter_h |
33 | 33 |
| 34 #include "bindings/core/v8/V8GCRoot.h" |
34 #include "core/dom/ActiveDOMObject.h" | 35 #include "core/dom/ActiveDOMObject.h" |
35 #include "core/dom/ExecutionContext.h" | 36 #include "core/dom/ExecutionContext.h" |
36 #include "core/fileapi/FileError.h" | 37 #include "core/fileapi/FileError.h" |
37 #include "modules/EventTargetModules.h" | 38 #include "modules/EventTargetModules.h" |
38 #include "modules/filesystem/FileWriterBase.h" | 39 #include "modules/filesystem/FileWriterBase.h" |
39 #include "platform/heap/Handle.h" | 40 #include "platform/heap/Handle.h" |
40 #include "public/platform/WebFileWriterClient.h" | 41 #include "public/platform/WebFileWriterClient.h" |
41 | 42 |
42 namespace blink { | 43 namespace blink { |
43 | 44 |
44 class Blob; | 45 class Blob; |
45 class ExceptionState; | 46 class ExceptionState; |
46 class ExecutionContext; | 47 class ExecutionContext; |
47 | 48 |
48 class FileWriter final | 49 class FileWriter final |
49 #if ENABLE(OILPAN) | 50 #if ENABLE(OILPAN) |
50 : public EventTargetWithInlineData | 51 : public EventTargetWithInlineData |
51 , public FileWriterBase | 52 , public FileWriterBase |
52 #else | 53 #else |
53 : public FileWriterBase | 54 : public FileWriterBase |
54 , public EventTargetWithInlineData | 55 , public EventTargetWithInlineData |
55 #endif | 56 #endif |
56 , public ActiveDOMObject | 57 , public ActiveDOMObject |
57 , public WebFileWriterClient { | 58 , public WebFileWriterClient |
| 59 , public V8GCRoot { |
58 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(FileWriterBase); | 60 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(FileWriterBase); |
59 DEFINE_WRAPPERTYPEINFO(); | 61 DEFINE_WRAPPERTYPEINFO(); |
60 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(FileWriter); | 62 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(FileWriter); |
61 public: | 63 public: |
62 static FileWriter* create(ExecutionContext*); | 64 static FileWriter* create(ExecutionContext*); |
63 ~FileWriter() override; | 65 ~FileWriter() override; |
64 | 66 |
65 enum ReadyState { | 67 enum ReadyState { |
66 INIT = 0, | 68 INIT = 0, |
67 WRITING = 1, | 69 WRITING = 1, |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 long long m_numAborts; | 129 long long m_numAborts; |
128 long long m_recursionDepth; | 130 long long m_recursionDepth; |
129 double m_lastProgressNotificationTimeMS; | 131 double m_lastProgressNotificationTimeMS; |
130 Member<Blob> m_blobBeingWritten; | 132 Member<Blob> m_blobBeingWritten; |
131 int m_asyncOperationId; | 133 int m_asyncOperationId; |
132 }; | 134 }; |
133 | 135 |
134 } // namespace blink | 136 } // namespace blink |
135 | 137 |
136 #endif // FileWriter_h | 138 #endif // FileWriter_h |
OLD | NEW |