OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_RENDERER_SPEECH_INPUT_DISPATCHER_H_ | 5 #ifndef CHROME_RENDERER_SPEECH_INPUT_DISPATCHER_H_ |
6 #define CHROME_RENDERER_SPEECH_INPUT_DISPATCHER_H_ | 6 #define CHROME_RENDERER_SPEECH_INPUT_DISPATCHER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "chrome/common/speech_input_result.h" |
9 #include "ipc/ipc_message.h" | 10 #include "ipc/ipc_message.h" |
10 #include "third_party/WebKit/WebKit/chromium/public/WebSpeechInputController.h" | 11 #include "third_party/WebKit/WebKit/chromium/public/WebSpeechInputController.h" |
11 | 12 |
12 class GURL; | 13 class GURL; |
13 class RenderView; | 14 class RenderView; |
14 | 15 |
15 namespace WebKit { | 16 namespace WebKit { |
16 class WebString; | 17 class WebString; |
17 struct WebRect; | 18 struct WebRect; |
18 class WebSpeechInputListener; | 19 class WebSpeechInputListener; |
(...skipping 15 matching lines...) Expand all Loading... |
34 // https://bugs.webkit.org/show_bug.cgi?id=47089 | 35 // https://bugs.webkit.org/show_bug.cgi?id=47089 |
35 bool startRecognition(int request_id, const WebKit::WebString& language, | 36 bool startRecognition(int request_id, const WebKit::WebString& language, |
36 const WebKit::WebRect& element_rect); | 37 const WebKit::WebRect& element_rect); |
37 | 38 |
38 bool startRecognition(int request_id, const WebKit::WebRect& element_rect); | 39 bool startRecognition(int request_id, const WebKit::WebRect& element_rect); |
39 | 40 |
40 void cancelRecognition(int request_id); | 41 void cancelRecognition(int request_id); |
41 void stopRecording(int request_id); | 42 void stopRecording(int request_id); |
42 | 43 |
43 private: | 44 private: |
44 void OnSpeechRecognitionResult(int request_id, const string16& result); | 45 void OnSpeechRecognitionResult( |
| 46 int request_id, const speech_input::SpeechInputResultArray& result); |
45 void OnSpeechRecordingComplete(int request_id); | 47 void OnSpeechRecordingComplete(int request_id); |
46 void OnSpeechRecognitionComplete(int request_id); | 48 void OnSpeechRecognitionComplete(int request_id); |
47 | 49 |
48 RenderView* render_view_; | 50 RenderView* render_view_; |
49 WebKit::WebSpeechInputListener* listener_; | 51 WebKit::WebSpeechInputListener* listener_; |
50 | 52 |
51 DISALLOW_COPY_AND_ASSIGN(SpeechInputDispatcher); | 53 DISALLOW_COPY_AND_ASSIGN(SpeechInputDispatcher); |
52 }; | 54 }; |
53 | 55 |
54 #endif // CHROME_RENDERER_SPEECH_INPUT_DISPATCHER_H_ | 56 #endif // CHROME_RENDERER_SPEECH_INPUT_DISPATCHER_H_ |
OLD | NEW |