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

Unified Diff: content/browser/speech/speech_recognizer.h

Issue 15907012: Implement SpeechRecognizerImplAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased, nits Created 7 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 side-by-side diff with in-line comments
Download patch
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_;
« no previous file with comments | « content/browser/speech/speech_recognition_manager_impl.cc ('k') | content/browser/speech/speech_recognizer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698