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

Side by Side Diff: content/renderer/speech_input_dispatcher.h

Issue 9568002: Renamed speech input implementation from to speech_recognition_*. The namespace has been renamed fr… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebased from master. Created 8 years, 9 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 unified diff | Download patch
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | content/renderer/speech_input_dispatcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_RENDERER_SPEECH_INPUT_DISPATCHER_H_
6 #define CONTENT_RENDERER_SPEECH_INPUT_DISPATCHER_H_
7
8 #include "base/basictypes.h"
9 #include "content/public/renderer/render_view_observer.h"
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSpeechInputControl ler.h"
11
12 class RenderViewImpl;
13
14 namespace content {
15 struct SpeechInputResult;
16 }
17
18 namespace WebKit {
19 class WebSpeechInputListener;
20 }
21
22 // SpeechInputDispatcher is a delegate for speech input messages used by WebKit.
23 // It's the complement of SpeechInputDispatcherHost (owned by RenderViewHost).
24 class SpeechInputDispatcher : public content::RenderViewObserver,
25 public WebKit::WebSpeechInputController {
26 public:
27 SpeechInputDispatcher(RenderViewImpl* render_view,
28 WebKit::WebSpeechInputListener* listener);
29
30 private:
31 // RenderView::Observer implementation.
32 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
33
34 // WebKit::WebSpeechInputController.
35 virtual bool startRecognition(int request_id,
36 const WebKit::WebRect& element_rect,
37 const WebKit::WebString& language,
38 const WebKit::WebString& grammar,
39 const WebKit::WebSecurityOrigin& origin);
40
41 virtual void cancelRecognition(int request_id);
42 virtual void stopRecording(int request_id);
43
44 void OnSpeechRecognitionResult(int request_id,
45 const content::SpeechInputResult& result);
46 void OnSpeechRecordingComplete(int request_id);
47 void OnSpeechRecognitionComplete(int request_id);
48 void OnSpeechRecognitionToggleSpeechInput();
49
50 WebKit::WebSpeechInputListener* listener_;
51
52 DISALLOW_COPY_AND_ASSIGN(SpeechInputDispatcher);
53 };
54
55 #endif // CHROME_RENDERER_SPEECH_INPUT_DISPATCHER_H_
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | content/renderer/speech_input_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698