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

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

Issue 10407120: Moving tray icon and notification balloon for background speech recognition sessions to ChromeSpeec… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed win issued ("interface" member clashes with a VS macro name, sigh) Created 8 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 OnStopCaptureRequest) 66 OnStopCaptureRequest)
67 IPC_MESSAGE_UNHANDLED(handled = false) 67 IPC_MESSAGE_UNHANDLED(handled = false)
68 IPC_END_MESSAGE_MAP() 68 IPC_END_MESSAGE_MAP()
69 return handled; 69 return handled;
70 } 70 }
71 71
72 void SpeechRecognitionDispatcherHost::OnStartRequest( 72 void SpeechRecognitionDispatcherHost::OnStartRequest(
73 const SpeechRecognitionHostMsg_StartRequest_Params& params) { 73 const SpeechRecognitionHostMsg_StartRequest_Params& params) {
74 74
75 SpeechRecognitionSessionContext context; 75 SpeechRecognitionSessionContext context;
76 context.context_name = params.origin_url;
76 context.render_process_id = render_process_id_; 77 context.render_process_id = render_process_id_;
77 context.render_view_id = params.render_view_id; 78 context.render_view_id = params.render_view_id;
78 context.request_id = params.request_id; 79 context.request_id = params.request_id;
80 context.requested_by_page_element = false;
79 81
80 SpeechRecognitionSessionConfig config; 82 SpeechRecognitionSessionConfig config;
81 config.is_one_shot = params.is_one_shot; 83 config.is_one_shot = params.is_one_shot;
82 config.language = params.language; 84 config.language = params.language;
83 config.grammars = params.grammars; 85 config.grammars = params.grammars;
84 config.origin_url = params.origin_url; 86 config.origin_url = params.origin_url;
85 config.initial_context = context; 87 config.initial_context = context;
86 config.url_request_context_getter = context_getter_.get(); 88 config.url_request_context_getter = context_getter_.get();
87 if (recognition_preferences_) { 89 if (recognition_preferences_) {
88 config.filter_profanities = recognition_preferences_->FilterProfanities(); 90 config.filter_profanities = recognition_preferences_->FilterProfanities();
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 error)); 184 error));
183 } 185 }
184 186
185 // The events below are currently not used by speech JS APIs implementation. 187 // The events below are currently not used by speech JS APIs implementation.
186 void SpeechRecognitionDispatcherHost::OnAudioLevelsChange( 188 void SpeechRecognitionDispatcherHost::OnAudioLevelsChange(
187 int session_id, float volume, float noise_volume) {} 189 int session_id, float volume, float noise_volume) {}
188 void SpeechRecognitionDispatcherHost::OnEnvironmentEstimationComplete( 190 void SpeechRecognitionDispatcherHost::OnEnvironmentEstimationComplete(
189 int session_id) {} 191 int session_id) {}
190 192
191 } // namespace speech 193 } // namespace speech
OLDNEW
« no previous file with comments | « chrome/common/pref_names.cc ('k') | content/public/browser/speech_recognition_session_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698