Chromium Code Reviews| Index: content/browser/speech/speech_recognizer.h |
| diff --git a/content/browser/speech/speech_recognizer.h b/content/browser/speech/speech_recognizer.h |
| index b9ba67be78459158897033bb3eed66164fda81eb..1d2f06b612d3b90071363945e719787a9bfc924d 100644 |
| --- a/content/browser/speech/speech_recognizer.h |
| +++ b/content/browser/speech/speech_recognizer.h |
| @@ -5,7 +5,9 @@ |
| #ifndef CONTENT_BROWSER_SPEECH_SPEECH_RECOGNIZER_H_ |
| #define CONTENT_BROWSER_SPEECH_SPEECH_RECOGNIZER_H_ |
| +#include "base/logging.h" |
| #include "base/memory/ref_counted.h" |
| +#include "content/common/content_export.h" |
| namespace content { |
| @@ -17,7 +19,9 @@ class CONTENT_EXPORT SpeechRecognizer |
| public: |
| SpeechRecognizer(SpeechRecognitionEventListener* listener, int session_id) |
| - : listener_(listener), session_id_(session_id) {} |
| + : listener_(listener), session_id_(session_id) { |
| + DCHECK(listener_ != NULL); |
|
Avi (use Gerrit)
2013/06/13 17:51:49
DCHECK(listener_);
should work just fine.
|
| + } |
| virtual void StartRecognition() = 0; |
| virtual void AbortRecognition() = 0; |
| @@ -26,13 +30,13 @@ class CONTENT_EXPORT SpeechRecognizer |
| virtual bool IsCapturingAudio() const = 0; |
| protected: |
| + friend class base::RefCountedThreadSafe<SpeechRecognizer>; |
| + |
| virtual ~SpeechRecognizer() {} |
| SpeechRecognitionEventListener* listener() const { return listener_; } |
| int session_id() const { return session_id_; } |
| private: |
| - friend class base::RefCountedThreadSafe<SpeechRecognizer>; |
| - |
| SpeechRecognitionEventListener* listener_; |
| int session_id_; |