OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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_recognizer.h" | 5 #include "content/browser/speech/speech_recognizer.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/time.h" | 8 #include "base/time.h" |
9 #include "content/browser/browser_thread.h" | 9 #include "content/public/browser/browser_thread.h" |
10 #include "net/url_request/url_request_context_getter.h" | 10 #include "net/url_request/url_request_context_getter.h" |
11 | 11 |
12 using media::AudioInputController; | 12 using media::AudioInputController; |
13 using std::string; | 13 using std::string; |
14 | 14 |
15 namespace { | 15 namespace { |
16 | 16 |
17 // The following constants are related to the volume level indicator shown in | 17 // The following constants are related to the volume level indicator shown in |
18 // the UI for recorded audio. | 18 // the UI for recorded audio. |
19 // Multiplier used when new volume is greater than previous level. | 19 // Multiplier used when new volume is greater than previous level. |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 SpeechInputError error) { | 298 SpeechInputError error) { |
299 DCHECK_NE(error, kErrorNone); | 299 DCHECK_NE(error, kErrorNone); |
300 CancelRecognition(); | 300 CancelRecognition(); |
301 | 301 |
302 // Guard against the delegate freeing us until we finish our job. | 302 // Guard against the delegate freeing us until we finish our job. |
303 scoped_refptr<SpeechRecognizer> me(this); | 303 scoped_refptr<SpeechRecognizer> me(this); |
304 delegate_->OnRecognizerError(caller_id_, error); | 304 delegate_->OnRecognizerError(caller_id_, error); |
305 } | 305 } |
306 | 306 |
307 } // namespace speech_input | 307 } // namespace speech_input |
OLD | NEW |