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

Side by Side Diff: content/browser/speech/speech_recognizer.cc

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. Created 9 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 | Annotate | Revision Log
OLDNEW
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/public/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 content::BrowserThread;
12 using media::AudioInputController; 13 using media::AudioInputController;
13 using std::string; 14 using std::string;
14 15
15 namespace { 16 namespace {
16 17
17 // The following constants are related to the volume level indicator shown in 18 // The following constants are related to the volume level indicator shown in
18 // the UI for recorded audio. 19 // the UI for recorded audio.
19 // Multiplier used when new volume is greater than previous level. 20 // Multiplier used when new volume is greater than previous level.
20 const float kUpSmoothingFactor = 1.0f; 21 const float kUpSmoothingFactor = 1.0f;
21 // Multiplier used when new volume is lesser than previous level. 22 // Multiplier used when new volume is lesser than previous level.
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 SpeechInputError error) { 299 SpeechInputError error) {
299 DCHECK_NE(error, kErrorNone); 300 DCHECK_NE(error, kErrorNone);
300 CancelRecognition(); 301 CancelRecognition();
301 302
302 // Guard against the delegate freeing us until we finish our job. 303 // Guard against the delegate freeing us until we finish our job.
303 scoped_refptr<SpeechRecognizer> me(this); 304 scoped_refptr<SpeechRecognizer> me(this);
304 delegate_->OnRecognizerError(caller_id_, error); 305 delegate_->OnRecognizerError(caller_id_, error);
305 } 306 }
306 307
307 } // namespace speech_input 308 } // namespace speech_input
OLDNEW
« no previous file with comments | « content/browser/speech/speech_input_manager.cc ('k') | content/browser/speech/speech_recognizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698