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

Side by Side Diff: third_party/WebKit/Source/core/fileapi/FileReaderSync.h

Issue 1878463002: Move DOMArrayBuffer, DOMArrayBufferViews and DataView to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tidy Created 4 years, 8 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 unified diff | Download patch
OLDNEW
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 15 matching lines...) Expand all
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 FileReaderSync_h 31 #ifndef FileReaderSync_h
32 #define FileReaderSync_h 32 #define FileReaderSync_h
33 33
34 #include "bindings/core/v8/ScriptWrappable.h" 34 #include "bindings/core/v8/ScriptWrappable.h"
35 #include "platform/heap/Handle.h" 35 #include "platform/heap/Handle.h"
36 #include "wtf/RefCounted.h"
37 #include "wtf/text/WTFString.h" 36 #include "wtf/text/WTFString.h"
38 37
39 namespace blink { 38 namespace blink {
40 39
41 class Blob; 40 class Blob;
42 class DOMArrayBuffer; 41 class DOMArrayBuffer;
43 class ExceptionState; 42 class ExceptionState;
44 class ExecutionContext; 43 class ExecutionContext;
45 class FileReaderLoader; 44 class FileReaderLoader;
46 45
47 class FileReaderSync final : public GarbageCollected<FileReaderSync>, public Scr iptWrappable { 46 class FileReaderSync final : public GarbageCollected<FileReaderSync>, public Scr iptWrappable {
48 DEFINE_WRAPPERTYPEINFO(); 47 DEFINE_WRAPPERTYPEINFO();
49 public: 48 public:
50 static FileReaderSync* create() 49 static FileReaderSync* create()
51 { 50 {
52 return new FileReaderSync(); 51 return new FileReaderSync();
53 } 52 }
54 53
55 PassRefPtr<DOMArrayBuffer> readAsArrayBuffer(ExecutionContext*, Blob*, Excep tionState&); 54 DOMArrayBuffer* readAsArrayBuffer(ExecutionContext*, Blob*, ExceptionState&) ;
56 String readAsBinaryString(ExecutionContext*, Blob*, ExceptionState&); 55 String readAsBinaryString(ExecutionContext*, Blob*, ExceptionState&);
57 String readAsText(ExecutionContext* executionContext, Blob* blob, ExceptionS tate& ec) 56 String readAsText(ExecutionContext* executionContext, Blob* blob, ExceptionS tate& ec)
58 { 57 {
59 return readAsText(executionContext, blob, "", ec); 58 return readAsText(executionContext, blob, "", ec);
60 } 59 }
61 String readAsText(ExecutionContext*, Blob*, const String& encoding, Exceptio nState&); 60 String readAsText(ExecutionContext*, Blob*, const String& encoding, Exceptio nState&);
62 String readAsDataURL(ExecutionContext*, Blob*, ExceptionState&); 61 String readAsDataURL(ExecutionContext*, Blob*, ExceptionState&);
63 62
64 DEFINE_INLINE_TRACE() { } 63 DEFINE_INLINE_TRACE() { }
65 64
66 private: 65 private:
67 FileReaderSync(); 66 FileReaderSync();
68 67
69 void startLoading(ExecutionContext*, FileReaderLoader&, const Blob&, Excepti onState&); 68 void startLoading(ExecutionContext*, FileReaderLoader&, const Blob&, Excepti onState&);
70 }; 69 };
71 70
72 } // namespace blink 71 } // namespace blink
73 72
74 #endif // FileReaderSync_h 73 #endif // FileReaderSync_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698