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

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

Issue 16294003: Update content/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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 | Annotate | Revision Log
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 "content/browser/speech/speech_recognition_dispatcher_host.h" 5 #include "content/browser/speech/speech_recognition_dispatcher_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "content/common/speech_recognition_messages.h" 10 #include "content/common/speech_recognition_messages.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 context.requested_by_page_element = false; 72 context.requested_by_page_element = false;
73 73
74 SpeechRecognitionSessionConfig config; 74 SpeechRecognitionSessionConfig config;
75 config.is_legacy_api = false; 75 config.is_legacy_api = false;
76 config.language = params.language; 76 config.language = params.language;
77 config.grammars = params.grammars; 77 config.grammars = params.grammars;
78 config.max_hypotheses = params.max_hypotheses; 78 config.max_hypotheses = params.max_hypotheses;
79 config.origin_url = params.origin_url; 79 config.origin_url = params.origin_url;
80 config.initial_context = context; 80 config.initial_context = context;
81 config.url_request_context_getter = context_getter_.get(); 81 config.url_request_context_getter = context_getter_.get();
82 if (recognition_preferences_) { 82 if (recognition_preferences_.get()) {
83 config.filter_profanities = recognition_preferences_->FilterProfanities(); 83 config.filter_profanities = recognition_preferences_->FilterProfanities();
84 } else { 84 } else {
85 config.filter_profanities = false; 85 config.filter_profanities = false;
86 } 86 }
87 config.continuous = params.continuous; 87 config.continuous = params.continuous;
88 config.interim_results = params.interim_results; 88 config.interim_results = params.interim_results;
89 config.event_listener = this; 89 config.event_listener = this;
90 90
91 int session_id = manager()->CreateSession(config); 91 int session_id = manager()->CreateSession(config);
92 DCHECK_NE(session_id, SpeechRecognitionManager::kSessionIDInvalid); 92 DCHECK_NE(session_id, SpeechRecognitionManager::kSessionIDInvalid);
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 void SpeechRecognitionDispatcherHost::OnAudioLevelsChange(int session_id, 185 void SpeechRecognitionDispatcherHost::OnAudioLevelsChange(int session_id,
186 float volume, 186 float volume,
187 float noise_volume) { 187 float noise_volume) {
188 } 188 }
189 189
190 void SpeechRecognitionDispatcherHost::OnEnvironmentEstimationComplete( 190 void SpeechRecognitionDispatcherHost::OnEnvironmentEstimationComplete(
191 int session_id) { 191 int session_id) {
192 } 192 }
193 193
194 } // namespace content 194 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/speech/input_tag_speech_dispatcher_host.cc ('k') | content/browser/speech/speech_recognition_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698