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

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

Issue 2577053002: ActiveScriptWrappable: GC wrappers in detached ExecutionContexts. (Closed)
Patch Set: component build fix(msvc) 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) 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 #include <memory> 43 #include <memory>
44 44
45 namespace blink { 45 namespace blink {
46 46
47 class Blob; 47 class Blob;
48 class ExceptionState; 48 class ExceptionState;
49 class ExecutionContext; 49 class ExecutionContext;
50 class StringOrArrayBuffer; 50 class StringOrArrayBuffer;
51 51
52 class CORE_EXPORT FileReader final : public EventTargetWithInlineData, 52 class CORE_EXPORT FileReader final : public EventTargetWithInlineData,
53 public ActiveScriptWrappable, 53 public ActiveScriptWrappable<FileReader>,
54 public SuspendableObject, 54 public SuspendableObject,
55 public FileReaderLoaderClient { 55 public FileReaderLoaderClient {
56 DEFINE_WRAPPERTYPEINFO(); 56 DEFINE_WRAPPERTYPEINFO();
57 USING_GARBAGE_COLLECTED_MIXIN(FileReader); 57 USING_GARBAGE_COLLECTED_MIXIN(FileReader);
58 58
59 public: 59 public:
60 static FileReader* create(ExecutionContext*); 60 static FileReader* create(ExecutionContext*);
61 61
62 ~FileReader() override; 62 ~FileReader() override;
63 63
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 DEFINE_ATTRIBUTE_EVENT_LISTENER(loadstart); 95 DEFINE_ATTRIBUTE_EVENT_LISTENER(loadstart);
96 DEFINE_ATTRIBUTE_EVENT_LISTENER(progress); 96 DEFINE_ATTRIBUTE_EVENT_LISTENER(progress);
97 DEFINE_ATTRIBUTE_EVENT_LISTENER(load); 97 DEFINE_ATTRIBUTE_EVENT_LISTENER(load);
98 DEFINE_ATTRIBUTE_EVENT_LISTENER(abort); 98 DEFINE_ATTRIBUTE_EVENT_LISTENER(abort);
99 DEFINE_ATTRIBUTE_EVENT_LISTENER(error); 99 DEFINE_ATTRIBUTE_EVENT_LISTENER(error);
100 DEFINE_ATTRIBUTE_EVENT_LISTENER(loadend); 100 DEFINE_ATTRIBUTE_EVENT_LISTENER(loadend);
101 101
102 DECLARE_VIRTUAL_TRACE(); 102 DECLARE_VIRTUAL_TRACE();
103 103
104 private: 104 private:
105 class ThrottlingController;
106
105 explicit FileReader(ExecutionContext*); 107 explicit FileReader(ExecutionContext*);
106 108
107 class ThrottlingController;
108
109 void terminate(); 109 void terminate();
110 void readInternal(Blob*, FileReaderLoader::ReadType, ExceptionState&); 110 void readInternal(Blob*, FileReaderLoader::ReadType, ExceptionState&);
111 void fireEvent(const AtomicString& type); 111 void fireEvent(const AtomicString& type);
112 112
113 void executePendingRead(); 113 void executePendingRead();
114 114
115 ReadyState m_state; 115 ReadyState m_state;
116 116
117 // Internal loading state, which could differ from ReadyState as it's 117 // Internal loading state, which could differ from ReadyState as it's
118 // for script-visible state while this one's for internal state. 118 // for script-visible state while this one's for internal state.
(...skipping 12 matching lines...) Expand all
131 String m_encoding; 131 String m_encoding;
132 132
133 std::unique_ptr<FileReaderLoader> m_loader; 133 std::unique_ptr<FileReaderLoader> m_loader;
134 Member<DOMException> m_error; 134 Member<DOMException> m_error;
135 double m_lastProgressNotificationTimeMS; 135 double m_lastProgressNotificationTimeMS;
136 }; 136 };
137 137
138 } // namespace blink 138 } // namespace blink
139 139
140 #endif // FileReader_h 140 #endif // FileReader_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/MessagePort.h ('k') | third_party/WebKit/Source/core/html/HTMLImageElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698