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

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

Issue 307433003: Oilpan: Allocate all EventTarget derived types on the manged heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/events/EventTarget.h ('k') | Source/core/fileapi/FileReader.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "wtf/ThreadSpecific.h" 43 #include "wtf/ThreadSpecific.h"
44 #include "wtf/text/WTFString.h" 44 #include "wtf/text/WTFString.h"
45 45
46 namespace WebCore { 46 namespace WebCore {
47 47
48 class Blob; 48 class Blob;
49 class ExceptionState; 49 class ExceptionState;
50 class ExecutionContext; 50 class ExecutionContext;
51 51
52 class FileReader FINAL : public RefCountedWillBeRefCountedGarbageCollected<FileR eader>, public ScriptWrappable, public ActiveDOMObject, public FileReaderLoaderC lient, public EventTargetWithInlineData { 52 class FileReader FINAL : public RefCountedWillBeRefCountedGarbageCollected<FileR eader>, public ScriptWrappable, public ActiveDOMObject, public FileReaderLoaderC lient, public EventTargetWithInlineData {
53 DEFINE_EVENT_TARGET_REFCOUNTING(RefCountedWillBeRefCountedGarbageCollected<F ileReader>); 53 REFCOUNTED_EVENT_TARGET(FileReader);
54 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(FileReader);
54 public: 55 public:
55 static PassRefPtrWillBeRawPtr<FileReader> create(ExecutionContext*); 56 static PassRefPtrWillBeRawPtr<FileReader> create(ExecutionContext*);
56 57
57 virtual ~FileReader(); 58 virtual ~FileReader();
58 59
59 enum ReadyState { 60 enum ReadyState {
60 EMPTY = 0, 61 EMPTY = 0,
61 LOADING = 1, 62 LOADING = 1,
62 DONE = 2 63 DONE = 2
63 }; 64 };
(...skipping 26 matching lines...) Expand all
90 virtual void didFinishLoading() OVERRIDE; 91 virtual void didFinishLoading() OVERRIDE;
91 virtual void didFail(FileError::ErrorCode) OVERRIDE; 92 virtual void didFail(FileError::ErrorCode) OVERRIDE;
92 93
93 DEFINE_ATTRIBUTE_EVENT_LISTENER(loadstart); 94 DEFINE_ATTRIBUTE_EVENT_LISTENER(loadstart);
94 DEFINE_ATTRIBUTE_EVENT_LISTENER(progress); 95 DEFINE_ATTRIBUTE_EVENT_LISTENER(progress);
95 DEFINE_ATTRIBUTE_EVENT_LISTENER(load); 96 DEFINE_ATTRIBUTE_EVENT_LISTENER(load);
96 DEFINE_ATTRIBUTE_EVENT_LISTENER(abort); 97 DEFINE_ATTRIBUTE_EVENT_LISTENER(abort);
97 DEFINE_ATTRIBUTE_EVENT_LISTENER(error); 98 DEFINE_ATTRIBUTE_EVENT_LISTENER(error);
98 DEFINE_ATTRIBUTE_EVENT_LISTENER(loadend); 99 DEFINE_ATTRIBUTE_EVENT_LISTENER(loadend);
99 100
100 void trace(Visitor*); 101 virtual void trace(Visitor*) OVERRIDE;
101 102
102 private: 103 private:
103 class ThrottlingController; 104 class ThrottlingController;
104 105
105 FileReader(ExecutionContext*); 106 FileReader(ExecutionContext*);
106 107
107 void terminate(); 108 void terminate();
108 void readInternal(Blob*, FileReaderLoader::ReadType, ExceptionState&); 109 void readInternal(Blob*, FileReaderLoader::ReadType, ExceptionState&);
109 void fireErrorEvent(int httpStatusCode); 110 void fireErrorEvent(int httpStatusCode);
110 void fireEvent(const AtomicString& type); 111 void fireEvent(const AtomicString& type);
(...skipping 19 matching lines...) Expand all
130 String m_encoding; 131 String m_encoding;
131 132
132 OwnPtr<FileReaderLoader> m_loader; 133 OwnPtr<FileReaderLoader> m_loader;
133 RefPtrWillBeMember<FileError> m_error; 134 RefPtrWillBeMember<FileError> m_error;
134 double m_lastProgressNotificationTimeMS; 135 double m_lastProgressNotificationTimeMS;
135 }; 136 };
136 137
137 } // namespace WebCore 138 } // namespace WebCore
138 139
139 #endif // FileReader_h 140 #endif // FileReader_h
OLDNEW
« no previous file with comments | « Source/core/events/EventTarget.h ('k') | Source/core/fileapi/FileReader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698