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

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

Issue 11347004: content/browser: Move speech code into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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_recognition_dispatcher_host.h
diff --git a/content/browser/speech/speech_recognition_dispatcher_host.h b/content/browser/speech/speech_recognition_dispatcher_host.h
index ee381ce63e2d9bdb06915efe0ec0fe6b90f086d9..df14953d755d9435ff9d843741f4bce5faff9e9b 100644
--- a/content/browser/speech/speech_recognition_dispatcher_host.h
+++ b/content/browser/speech/speech_recognition_dispatcher_host.h
@@ -14,25 +14,23 @@
struct SpeechRecognitionHostMsg_StartRequest_Params;
namespace content {
+
class SpeechRecognitionManager;
class SpeechRecognitionPreferences;
struct SpeechRecognitionResult;
-}
-
-namespace speech {
// SpeechRecognitionDispatcherHost is a delegate for Speech API messages used by
// RenderMessageFilter. Basically it acts as a proxy, relaying the events coming
// from the SpeechRecognitionManager to IPC messages (and vice versa).
// It's the complement of SpeechRecognitionDispatcher (owned by RenderView).
class CONTENT_EXPORT SpeechRecognitionDispatcherHost
- : public content::BrowserMessageFilter,
- public content::SpeechRecognitionEventListener {
+ : public BrowserMessageFilter,
+ public SpeechRecognitionEventListener {
public:
SpeechRecognitionDispatcherHost(
int render_process_id,
net::URLRequestContextGetter* context_getter,
- content::SpeechRecognitionPreferences* recognition_preferences);
+ SpeechRecognitionPreferences* recognition_preferences);
// SpeechRecognitionEventListener methods.
virtual void OnRecognitionStart(int session_id) OVERRIDE;
@@ -43,18 +41,21 @@ class CONTENT_EXPORT SpeechRecognitionDispatcherHost
virtual void OnAudioEnd(int session_id) OVERRIDE;
virtual void OnRecognitionEnd(int session_id) OVERRIDE;
virtual void OnRecognitionResult(
- int session_id, const content::SpeechRecognitionResult& result) OVERRIDE;
+ int session_id,
+ const SpeechRecognitionResult& result) OVERRIDE;
virtual void OnRecognitionError(
- int session_id, const content::SpeechRecognitionError& error) OVERRIDE;
- virtual void OnAudioLevelsChange(
- int session_id, float volume, float noise_volume) OVERRIDE;
+ int session_id,
+ const SpeechRecognitionError& error) OVERRIDE;
+ virtual void OnAudioLevelsChange(int session_id,
+ float volume,
+ float noise_volume) OVERRIDE;
- // content::BrowserMessageFilter implementation.
+ // BrowserMessageFilter implementation.
virtual bool OnMessageReceived(const IPC::Message& message,
bool* message_was_ok) OVERRIDE;
// Singleton manager setter useful for tests.
- static void SetManagerForTests(content::SpeechRecognitionManager* manager);
+ static void SetManagerForTests(SpeechRecognitionManager* manager);
private:
virtual ~SpeechRecognitionDispatcherHost();
@@ -65,17 +66,17 @@ class CONTENT_EXPORT SpeechRecognitionDispatcherHost
void OnStopCaptureRequest(int render_view_id, int request_id);
// Returns the speech recognition manager to forward requests to.
- content::SpeechRecognitionManager* manager();
+ SpeechRecognitionManager* manager();
int render_process_id_;
scoped_refptr<net::URLRequestContextGetter> context_getter_;
- scoped_refptr<content::SpeechRecognitionPreferences> recognition_preferences_;
+ scoped_refptr<SpeechRecognitionPreferences> recognition_preferences_;
- static content::SpeechRecognitionManager* manager_for_tests_;
+ static SpeechRecognitionManager* manager_for_tests_;
DISALLOW_COPY_AND_ASSIGN(SpeechRecognitionDispatcherHost);
};
-} // namespace speech
+} // namespace content
#endif // CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_DISPATCHER_HOST_H_

Powered by Google App Engine
This is Rietveld 408576698