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

Unified Diff: Source/core/speech/SpeechInput.h

Issue 255983003: Oilpan: Move all supplements of Page, Document, and WorkerClients to the managed heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: using namespace WebCore Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/page/Page.cpp ('k') | Source/core/speech/SpeechInput.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/speech/SpeechInput.h
diff --git a/Source/core/speech/SpeechInput.h b/Source/core/speech/SpeechInput.h
index 7fd2448902beb28a452b29d43950850a62683e1b..908fb084a3773186f011ff116613e57bcd76c18d 100644
--- a/Source/core/speech/SpeechInput.h
+++ b/Source/core/speech/SpeechInput.h
@@ -43,24 +43,23 @@ namespace WebCore {
class IntRect;
class SecurityOrigin;
class SpeechInputClient;
-class SpeechInputListener;
-class InputFieldSpeechButtonElement;
// This class connects the input elements requiring speech input with the platform specific
// speech recognition engine. It provides methods for the input elements to activate speech
// recognition and methods for the speech recognition engine to return back the results.
-class SpeechInput FINAL : public SpeechInputListener, public Supplement<Page> {
+class SpeechInput FINAL : public NoBaseWillBeGarbageCollectedFinalized<SpeechInput>, public SpeechInputListener, public WillBeHeapSupplement<Page> {
+ WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(SpeechInput);
WTF_MAKE_NONCOPYABLE(SpeechInput);
public:
virtual ~SpeechInput();
- static PassOwnPtr<SpeechInput> create(PassOwnPtr<SpeechInputClient>);
+ static PassOwnPtrWillBeRawPtr<SpeechInput> create(PassOwnPtr<SpeechInputClient>);
static const char* supplementName();
- static SpeechInput* from(Page* page) { return static_cast<SpeechInput*>(Supplement<Page>::from(page, supplementName())); }
+ static SpeechInput* from(Page* page) { return static_cast<SpeechInput*>(WillBeHeapSupplement<Page>::from(page, supplementName())); }
// Generates a unique ID for the given listener to be used for speech requests.
// This should be the first call made by listeners before anything else.
- int registerListener(InputFieldSpeechButtonElement*);
+ int registerListener(SpeechInputListener*);
// Invoked when the listener is done with recording or getting destroyed.
// Failure to unregister may result in crashes if there were any pending speech events.
@@ -76,18 +75,14 @@ public:
virtual void didCompleteRecognition(int) OVERRIDE;
virtual void setRecognitionResult(int, const SpeechInputResultArray&) OVERRIDE;
- virtual void trace(Visitor*) OVERRIDE { }
+ virtual void trace(Visitor*) OVERRIDE;
void clearWeakMembers(Visitor*);
private:
explicit SpeechInput(PassOwnPtr<SpeechInputClient>);
OwnPtr<SpeechInputClient> m_client;
- // FIXME: Oilpan: go back to using SpeechInputListener as the type when
- // all SpeechInputListeners (SpeechInput and InputFieldSpeechButtonElement)
- // have been moved to the oilpan heap. At that point SpeechInputListener
- // will be a GarbageCollectedMixin.
- HashMap<int, InputFieldSpeechButtonElement*> m_listeners;
+ WillBeHeapHashMap<int, RawPtrWillBeWeakMember<SpeechInputListener> > m_listeners;
int m_nextListenerId;
};
« no previous file with comments | « Source/core/page/Page.cpp ('k') | Source/core/speech/SpeechInput.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698