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..4727109401a56e7e5d811f5ce710bd08fd271545 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_); |
+ } |
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_; |