Index: content/browser/speech/speech_recognition_dispatcher_host.h |
diff --git a/content/browser/speech/input_tag_speech_dispatcher_host.h b/content/browser/speech/speech_recognition_dispatcher_host.h |
similarity index 67% |
copy from content/browser/speech/input_tag_speech_dispatcher_host.h |
copy to content/browser/speech/speech_recognition_dispatcher_host.h |
index b98d9e5f580158f7918d82838579372d41931af4..93f18a3d73e60a68af93ea3ea174ca8e85b8da9d 100644 |
--- a/content/browser/speech/input_tag_speech_dispatcher_host.h |
+++ b/content/browser/speech/speech_recognition_dispatcher_host.h |
@@ -2,8 +2,8 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef CONTENT_BROWSER_SPEECH_INPUT_TAG_SPEECH_DISPATCHER_HOST_H_ |
-#define CONTENT_BROWSER_SPEECH_INPUT_TAG_SPEECH_DISPATCHER_HOST_H_ |
+#ifndef CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_DISPATCHER_HOST_H_ |
+#define CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_DISPATCHER_HOST_H_ |
#pragma once |
#include "base/memory/scoped_ptr.h" |
@@ -12,7 +12,7 @@ |
#include "content/public/browser/speech_recognition_event_listener.h" |
#include "net/url_request/url_request_context_getter.h" |
-struct InputTagSpeechHostMsg_StartRecognition_Params; |
+struct SpeechRecognitionHostMsg_StartRequest_Params; |
namespace content { |
class SpeechRecognitionPreferences; |
@@ -23,17 +23,17 @@ namespace speech { |
class SpeechRecognitionManagerImpl; |
-// InputTagSpeechDispatcherHost is a delegate for Speech API messages used by |
+// 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 InputTagSpeechDispatcherHost |
+class CONTENT_EXPORT SpeechRecognitionDispatcherHost |
: public content::BrowserMessageFilter, |
public content::SpeechRecognitionEventListener { |
public: |
- InputTagSpeechDispatcherHost( |
+ SpeechRecognitionDispatcherHost( |
int render_process_id, |
- net::URLRequestContextGetter* url_request_context_getter, |
+ net::URLRequestContextGetter* context_getter, |
content::SpeechRecognitionPreferences* recognition_preferences); |
// SpeechRecognitionEventListener methods. |
@@ -59,28 +59,27 @@ class CONTENT_EXPORT InputTagSpeechDispatcherHost |
static void set_manager(SpeechRecognitionManagerImpl* manager); |
private: |
- virtual ~InputTagSpeechDispatcherHost(); |
+ virtual ~SpeechRecognitionDispatcherHost(); |
- void OnStartRecognition( |
- const InputTagSpeechHostMsg_StartRecognition_Params ¶ms); |
- void OnCancelRecognition(int render_view_id, int request_id); |
- void OnStopRecording(int render_view_id, int request_id); |
+ void OnStartRequest( |
+ const SpeechRecognitionHostMsg_StartRequest_Params& params); |
+ void OnAbortRequest(int render_view_id, int js_handle_id); |
+ void OnStopCaptureRequest(int render_view_id, int js_handle_id); |
- // Returns the speech recognition manager to forward events to, creating one |
- // if needed. |
+ // Returns the speech recognition manager to forward requests to. |
SpeechRecognitionManagerImpl* manager(); |
int render_process_id_; |
- bool may_have_pending_requests_; // Set if we received any speech IPC request |
+ bool may_have_pending_requests_; // Set if we received any IPC request. |
- scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_; |
+ scoped_refptr<net::URLRequestContextGetter> context_getter_; |
scoped_refptr<content::SpeechRecognitionPreferences> recognition_preferences_; |
- static SpeechRecognitionManagerImpl* manager_; |
+ static SpeechRecognitionManagerImpl* manager_for_tests_; |
- DISALLOW_COPY_AND_ASSIGN(InputTagSpeechDispatcherHost); |
+ DISALLOW_COPY_AND_ASSIGN(SpeechRecognitionDispatcherHost); |
}; |
} // namespace speech |
-#endif // CONTENT_BROWSER_SPEECH_INPUT_TAG_SPEECH_DISPATCHER_HOST_H_ |
+#endif // CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_DISPATCHER_HOST_H_ |