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

Side by Side Diff: content/browser/speech/speech_recognition_dispatcher_host.h

Issue 549373003: Binding media stream audio track to speech recognition [browser] Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Introduce SpeechRecognitionAudioReceiver Created 6 years, 2 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
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_BROWSER_SPEECH_SPEECH_RECOGNITION_DISPATCHER_HOST_H_ 5 #ifndef CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_DISPATCHER_HOST_H_
6 #define CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_DISPATCHER_HOST_H_ 6 #define CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_DISPATCHER_HOST_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/sync_socket.h"
10 #include "content/common/content_export.h" 11 #include "content/common/content_export.h"
11 #include "content/public/browser/browser_message_filter.h" 12 #include "content/public/browser/browser_message_filter.h"
12 #include "content/public/browser/speech_recognition_event_listener.h" 13 #include "content/public/browser/speech_recognition_event_listener.h"
13 #include "net/url_request/url_request_context_getter.h" 14 #include "net/url_request/url_request_context_getter.h"
14 15
15 struct SpeechRecognitionHostMsg_StartRequest_Params; 16 struct SpeechRecognitionHostMsg_StartRequest_Params;
16 17
17 namespace content { 18 namespace content {
18 19
19 class SpeechRecognitionManager; 20 class SpeechRecognitionManager;
(...skipping 23 matching lines...) Expand all
43 virtual void OnRecognitionEnd(int session_id) OVERRIDE; 44 virtual void OnRecognitionEnd(int session_id) OVERRIDE;
44 virtual void OnRecognitionResults( 45 virtual void OnRecognitionResults(
45 int session_id, 46 int session_id,
46 const SpeechRecognitionResults& results) OVERRIDE; 47 const SpeechRecognitionResults& results) OVERRIDE;
47 virtual void OnRecognitionError( 48 virtual void OnRecognitionError(
48 int session_id, 49 int session_id,
49 const SpeechRecognitionError& error) OVERRIDE; 50 const SpeechRecognitionError& error) OVERRIDE;
50 virtual void OnAudioLevelsChange(int session_id, 51 virtual void OnAudioLevelsChange(int session_id,
51 float volume, 52 float volume,
52 float noise_volume) OVERRIDE; 53 float noise_volume) OVERRIDE;
54 virtual void OnSharedAudioBusReady(
55 int session_id,
56 const media::AudioParameters& params,
57 base::SharedMemoryHandle memory,
58 base::SyncSocket::TransitDescriptor socket) OVERRIDE;
53 59
54 // BrowserMessageFilter implementation. 60 // BrowserMessageFilter implementation.
55 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 61 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
56 virtual void OverrideThreadForMessage( 62 virtual void OverrideThreadForMessage(
57 const IPC::Message& message, 63 const IPC::Message& message,
58 BrowserThread::ID* thread) OVERRIDE; 64 BrowserThread::ID* thread) OVERRIDE;
59 65
60 virtual void OnChannelClosing() OVERRIDE; 66 virtual void OnChannelClosing() OVERRIDE;
61 67
62 private: 68 private:
(...skipping 18 matching lines...) Expand all
81 // about this class being destroyed in the meanwhile (due to browser shutdown) 87 // about this class being destroyed in the meanwhile (due to browser shutdown)
82 // since tasks pending on a destroyed WeakPtr are automatically discarded. 88 // since tasks pending on a destroyed WeakPtr are automatically discarded.
83 base::WeakPtrFactory<SpeechRecognitionDispatcherHost> weak_factory_; 89 base::WeakPtrFactory<SpeechRecognitionDispatcherHost> weak_factory_;
84 90
85 DISALLOW_COPY_AND_ASSIGN(SpeechRecognitionDispatcherHost); 91 DISALLOW_COPY_AND_ASSIGN(SpeechRecognitionDispatcherHost);
86 }; 92 };
87 93
88 } // namespace content 94 } // namespace content
89 95
90 #endif // CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_DISPATCHER_HOST_H_ 96 #endif // CONTENT_BROWSER_SPEECH_SPEECH_RECOGNITION_DISPATCHER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698