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

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

Issue 235113002: Oilpan: Remove guardRef and guardDeref from TreeScope. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comments. 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 ead0a25285d6f912b71da6c1375361b3d3a18349..7fd2448902beb28a452b29d43950850a62683e1b 100644
--- a/Source/core/speech/SpeechInput.h
+++ b/Source/core/speech/SpeechInput.h
@@ -44,6 +44,7 @@ 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
@@ -59,7 +60,7 @@ public:
// 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(SpeechInputListener*);
+ int registerListener(InputFieldSpeechButtonElement*);
// 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,12 +77,17 @@ public:
virtual void setRecognitionResult(int, const SpeechInputResultArray&) OVERRIDE;
virtual void trace(Visitor*) OVERRIDE { }
+ void clearWeakMembers(Visitor*);
private:
explicit SpeechInput(PassOwnPtr<SpeechInputClient>);
OwnPtr<SpeechInputClient> m_client;
- HashMap<int, SpeechInputListener*> m_listeners;
+ // 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;
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