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

Side by Side Diff: chrome/browser/speech/chrome_speech_recognition_manager_delegate.cc

Issue 549373003: Binding media stream audio track to speech recognition [browser] Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Wait with no timeout Created 6 years, 1 month 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 #include "chrome/browser/speech/chrome_speech_recognition_manager_delegate.h" 5 #include "chrome/browser/speech/chrome_speech_recognition_manager_delegate.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 } 320 }
321 321
322 void ChromeSpeechRecognitionManagerDelegate::OnRecognitionError( 322 void ChromeSpeechRecognitionManagerDelegate::OnRecognitionError(
323 int session_id, const content::SpeechRecognitionError& error) { 323 int session_id, const content::SpeechRecognitionError& error) {
324 } 324 }
325 325
326 void ChromeSpeechRecognitionManagerDelegate::OnAudioLevelsChange( 326 void ChromeSpeechRecognitionManagerDelegate::OnAudioLevelsChange(
327 int session_id, float volume, float noise_volume) { 327 int session_id, float volume, float noise_volume) {
328 } 328 }
329 329
330 void ChromeSpeechRecognitionManagerDelegate::OnAudioReceiverReady(
331 int session_id,
332 const media::AudioParameters& params,
333 const base::SharedMemoryHandle memory,
334 const base::SyncSocket::TransitDescriptor socket) {
335 }
336
330 void ChromeSpeechRecognitionManagerDelegate::OnRecognitionEnd(int session_id) { 337 void ChromeSpeechRecognitionManagerDelegate::OnRecognitionEnd(int session_id) {
331 } 338 }
332 339
333 void ChromeSpeechRecognitionManagerDelegate::GetDiagnosticInformation( 340 void ChromeSpeechRecognitionManagerDelegate::GetDiagnosticInformation(
334 bool* can_report_metrics, 341 bool* can_report_metrics,
335 std::string* hardware_info) { 342 std::string* hardware_info) {
336 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 343 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
337 if (!optional_request_info_.get()) { 344 if (!optional_request_info_.get()) {
338 optional_request_info_ = new OptionalRequestInfo(); 345 optional_request_info_ = new OptionalRequestInfo();
339 // Since hardware info is optional with speech input requests, we start an 346 // Since hardware info is optional with speech input requests, we start an
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 // Otherwise this should be a regular tab contents. 450 // Otherwise this should be a regular tab contents.
444 allowed = true; 451 allowed = true;
445 check_permission = true; 452 check_permission = true;
446 #endif 453 #endif
447 454
448 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, 455 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
449 base::Bind(callback, check_permission, allowed)); 456 base::Bind(callback, check_permission, allowed));
450 } 457 }
451 458
452 } // namespace speech 459 } // namespace speech
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698