| 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 c7c96edb80bdc931d214be71b0a00957ca626d5c..3ebd8e46f1ae66331d835470337cd22e957d8178 100644
|
| --- a/content/browser/speech/input_tag_speech_dispatcher_host.h
|
| +++ b/content/browser/speech/speech_recognition_dispatcher_host.h
|
| @@ -2,18 +2,17 @@
|
| // 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/compiler_specific.h"
|
| -#include "base/memory/ref_counted.h"
|
| +#include "base/memory/scoped_ptr.h"
|
| #include "content/common/content_export.h"
|
| #include "content/public/browser/browser_message_filter.h"
|
| #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 SpeechRecognitionManager;
|
| @@ -23,17 +22,17 @@ struct SpeechRecognitionResult;
|
|
|
| namespace speech {
|
|
|
| -// 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 +58,25 @@ class CONTENT_EXPORT InputTagSpeechDispatcherHost
|
| static void SetManagerForTests(content::SpeechRecognitionManager* 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 request_id);
|
| + void OnStopCaptureRequest(int render_view_id, int request_id);
|
|
|
| - // Returns the speech recognition manager to forward events to, creating one
|
| - // if needed.
|
| + // Returns the speech recognition manager to forward requests to.
|
| content::SpeechRecognitionManager* manager();
|
|
|
| int render_process_id_;
|
| - bool may_have_pending_requests_; // Set if we received any speech IPC request
|
| -
|
| - scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_;
|
| + scoped_refptr<net::URLRequestContextGetter> context_getter_;
|
| scoped_refptr<content::SpeechRecognitionPreferences> recognition_preferences_;
|
|
|
| static content::SpeechRecognitionManager* 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_
|
|
|