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

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

Issue 416053002: Revert of Turn webspeech on/off when tab goes fore/background (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | content/renderer/speech_recognition_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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_RENDERER_SPEECH_RECOGNITION_DISPATCHER_H_ 5 #ifndef CONTENT_RENDERER_SPEECH_RECOGNITION_DISPATCHER_H_
6 #define CONTENT_RENDERER_SPEECH_RECOGNITION_DISPATCHER_H_ 6 #define CONTENT_RENDERER_SPEECH_RECOGNITION_DISPATCHER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 10 matching lines...) Expand all
21 21
22 // SpeechRecognitionDispatcher is a delegate for methods used by WebKit for 22 // SpeechRecognitionDispatcher is a delegate for methods used by WebKit for
23 // scripted JS speech APIs. It's the complement of 23 // scripted JS speech APIs. It's the complement of
24 // SpeechRecognitionDispatcherHost (owned by RenderViewHost). 24 // SpeechRecognitionDispatcherHost (owned by RenderViewHost).
25 class SpeechRecognitionDispatcher : public RenderViewObserver, 25 class SpeechRecognitionDispatcher : public RenderViewObserver,
26 public blink::WebSpeechRecognizer { 26 public blink::WebSpeechRecognizer {
27 public: 27 public:
28 explicit SpeechRecognitionDispatcher(RenderViewImpl* render_view); 28 explicit SpeechRecognitionDispatcher(RenderViewImpl* render_view);
29 virtual ~SpeechRecognitionDispatcher(); 29 virtual ~SpeechRecognitionDispatcher();
30 30
31 // Aborts all speech recognitions.
32 void AbortAllRecognitions();
33
34 private: 31 private:
35 // RenderViewObserver implementation. 32 // RenderViewObserver implementation.
36 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 33 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
37 34
38 // blink::WebSpeechRecognizer implementation. 35 // blink::WebSpeechRecognizer implementation.
39 virtual void start(const blink::WebSpeechRecognitionHandle&, 36 virtual void start(const blink::WebSpeechRecognitionHandle&,
40 const blink::WebSpeechRecognitionParams&, 37 const blink::WebSpeechRecognitionParams&,
41 blink::WebSpeechRecognizerClient*) OVERRIDE; 38 blink::WebSpeechRecognizerClient*) OVERRIDE;
42 virtual void stop(const blink::WebSpeechRecognitionHandle&, 39 virtual void stop(const blink::WebSpeechRecognitionHandle&,
43 blink::WebSpeechRecognizerClient*) OVERRIDE; 40 blink::WebSpeechRecognizerClient*) OVERRIDE;
(...skipping 20 matching lines...) Expand all
64 typedef std::map<int, blink::WebSpeechRecognitionHandle> HandleMap; 61 typedef std::map<int, blink::WebSpeechRecognitionHandle> HandleMap;
65 HandleMap handle_map_; 62 HandleMap handle_map_;
66 int next_id_; 63 int next_id_;
67 64
68 DISALLOW_COPY_AND_ASSIGN(SpeechRecognitionDispatcher); 65 DISALLOW_COPY_AND_ASSIGN(SpeechRecognitionDispatcher);
69 }; 66 };
70 67
71 } // namespace content 68 } // namespace content
72 69
73 #endif // CONTENT_RENDERER_SPEECH_RECOGNITION_DISPATCHER_H_ 70 #endif // CONTENT_RENDERER_SPEECH_RECOGNITION_DISPATCHER_H_
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | content/renderer/speech_recognition_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698