OLD | NEW |
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 "content/browser/speech/speech_recognition_manager_impl.h" | 5 #include "content/browser/speech/speech_recognition_manager_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "content/browser/browser_main_loop.h" | 8 #include "content/browser/browser_main_loop.h" |
9 #include "content/browser/renderer_host/media/media_stream_manager.h" | 9 #include "content/browser/renderer_host/media/media_stream_manager.h" |
10 #include "content/browser/speech/google_one_shot_remote_engine.h" | 10 #include "content/browser/speech/google_one_shot_remote_engine.h" |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 callback_.Run(true); | 104 callback_.Run(true); |
105 } | 105 } |
106 | 106 |
107 virtual void StreamGenerationFailed(const std::string& label) OVERRIDE { | 107 virtual void StreamGenerationFailed(const std::string& label) OVERRIDE { |
108 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 108 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
109 started_ = false; | 109 started_ = false; |
110 callback_.Run(false); | 110 callback_.Run(false); |
111 } | 111 } |
112 | 112 |
113 // The callbacks below are ignored. | 113 // The callbacks below are ignored. |
114 virtual void AudioDeviceFailed(const std::string& label, | |
115 int index) OVERRIDE {} | |
116 virtual void VideoDeviceFailed(const std::string& label, | |
117 int index) OVERRIDE {} | |
118 virtual void DevicesEnumerated( | 114 virtual void DevicesEnumerated( |
119 const std::string& label, | 115 const std::string& label, |
120 const media_stream::StreamDeviceInfoArray& devices) OVERRIDE {} | 116 const media_stream::StreamDeviceInfoArray& devices) OVERRIDE {} |
121 virtual void DeviceOpened( | 117 virtual void DeviceOpened( |
122 const std::string& label, | 118 const std::string& label, |
123 const media_stream::StreamDeviceInfo& device_info) OVERRIDE {} | 119 const media_stream::StreamDeviceInfo& device_info) OVERRIDE {} |
124 | 120 |
125 private: | 121 private: |
126 int session_id_; | 122 int session_id_; |
127 base::Callback<void(bool is_allowed)> callback_; | 123 base::Callback<void(bool is_allowed)> callback_; |
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
672 | 668 |
673 SpeechRecognitionManagerImpl::Session::Session() | 669 SpeechRecognitionManagerImpl::Session::Session() |
674 : id(kSessionIDInvalid), | 670 : id(kSessionIDInvalid), |
675 listener_is_active(true) { | 671 listener_is_active(true) { |
676 } | 672 } |
677 | 673 |
678 SpeechRecognitionManagerImpl::Session::~Session() { | 674 SpeechRecognitionManagerImpl::Session::~Session() { |
679 } | 675 } |
680 | 676 |
681 } // namespace speech | 677 } // namespace speech |
OLD | NEW |