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

Unified Diff: Source/core/fileapi/FileReader.h

Issue 26878003: Reduce repetitive EventTarget subclassing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix nit Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/events/EventTarget.cpp ('k') | Source/core/html/MediaController.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fileapi/FileReader.h
diff --git a/Source/core/fileapi/FileReader.h b/Source/core/fileapi/FileReader.h
index 22f3708921c165413951991671e27882574c7449..7b21d6c791014bf965e40aa387bf46d5fc89933c 100644
--- a/Source/core/fileapi/FileReader.h
+++ b/Source/core/fileapi/FileReader.h
@@ -47,7 +47,7 @@ class Blob;
class ExceptionState;
class ScriptExecutionContext;
-class FileReader : public RefCounted<FileReader>, public ScriptWrappable, public ActiveDOMObject, public EventTarget, public FileReaderLoaderClient {
+class FileReader : public RefCounted<FileReader>, public ScriptWrappable, public ActiveDOMObject, public EventTargetWithInlineData, public FileReaderLoaderClient {
public:
static PassRefPtr<FileReader> create(ScriptExecutionContext*);
@@ -79,8 +79,8 @@ public:
virtual void stop();
// EventTarget
- virtual const AtomicString& interfaceName() const;
- virtual ScriptExecutionContext* scriptExecutionContext() const { return ActiveDOMObject::scriptExecutionContext(); }
+ virtual const AtomicString& interfaceName() const OVERRIDE;
+ virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE { return ActiveDOMObject::scriptExecutionContext(); }
// FileReaderLoaderClient
virtual void didStartLoading();
@@ -102,10 +102,8 @@ private:
FileReader(ScriptExecutionContext*);
// EventTarget
- virtual void refEventTarget() { ref(); }
- virtual void derefEventTarget() { deref(); }
- virtual EventTargetData* eventTargetData() { return &m_eventTargetData; }
- virtual EventTargetData* ensureEventTargetData() { return &m_eventTargetData; }
+ virtual void refEventTarget() OVERRIDE { ref(); }
+ virtual void derefEventTarget() OVERRIDE { deref(); }
void terminate();
void readInternal(Blob*, FileReaderLoader::ReadType, ExceptionState&);
@@ -123,8 +121,6 @@ private:
};
LoadingState m_loadingState;
- EventTargetData m_eventTargetData;
-
RefPtr<Blob> m_blob;
FileReaderLoader::ReadType m_readType;
String m_encoding;
« no previous file with comments | « Source/core/events/EventTarget.cpp ('k') | Source/core/html/MediaController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698