summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/speech_input_dispatcher.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/renderer/speech_input_dispatcher.h')
-rw-r--r--chrome/renderer/speech_input_dispatcher.h16
1 files changed, 6 insertions, 10 deletions
diff --git a/chrome/renderer/speech_input_dispatcher.h b/chrome/renderer/speech_input_dispatcher.h
index e993226..d5a3ce4 100644
--- a/chrome/renderer/speech_input_dispatcher.h
+++ b/chrome/renderer/speech_input_dispatcher.h
@@ -7,28 +7,26 @@
#include "base/basictypes.h"
#include "chrome/common/speech_input_result.h"
-#include "ipc/ipc_channel.h"
+#include "chrome/renderer/render_view_observer.h"
#include "third_party/WebKit/WebKit/chromium/public/WebSpeechInputController.h"
class GURL;
-class RenderView;
namespace WebKit {
class WebSpeechInputListener;
-class WebString;
-struct WebRect;
}
// SpeechInputDispatcher is a delegate for speech input messages used by WebKit.
// It's the complement of SpeechInputDispatcherHost (owned by RenderViewHost).
-class SpeechInputDispatcher : public WebKit::WebSpeechInputController,
- public IPC::Channel::Listener {
+class SpeechInputDispatcher : public RenderViewObserver,
+ public WebKit::WebSpeechInputController {
public:
SpeechInputDispatcher(RenderView* render_view,
WebKit::WebSpeechInputListener* listener);
- // IPC::Channel::Listener implementation.
- bool OnMessageReceived(const IPC::Message& msg);
+ private:
+ // RenderView::Observer implementation.
+ bool OnMessageReceived(const IPC::Message& message);
// WebKit::WebSpeechInputController.
virtual bool startRecognition(int request_id,
@@ -39,13 +37,11 @@ class SpeechInputDispatcher : public WebKit::WebSpeechInputController,
virtual void cancelRecognition(int request_id);
virtual void stopRecording(int request_id);
- private:
void OnSpeechRecognitionResult(
int request_id, const speech_input::SpeechInputResultArray& result);
void OnSpeechRecordingComplete(int request_id);
void OnSpeechRecognitionComplete(int request_id);
- RenderView* render_view_;
WebKit::WebSpeechInputListener* listener_;
DISALLOW_COPY_AND_ASSIGN(SpeechInputDispatcher);