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

Side by Side Diff: content/public/test/fake_speech_recognition_manager.cc

Issue 16286010: Removed the IsRecordingInProcess check for speech since it is not needed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removed unused error code and relevant resource, cleaned up include 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
« no previous file with comments | « content/public/test/fake_speech_recognition_manager.h ('k') | media/audio/audio_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/public/test/fake_speech_recognition_manager.h" 5 #include "content/public/test/fake_speech_recognition_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "content/public/browser/speech_recognition_event_listener.h" 10 #include "content/public/browser/speech_recognition_event_listener.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 did_cancel_all_ = true; 91 did_cancel_all_ = true;
92 } 92 }
93 93
94 void FakeSpeechRecognitionManager::AbortAllSessionsForRenderView( 94 void FakeSpeechRecognitionManager::AbortAllSessionsForRenderView(
95 int render_process_id, int render_view_id) { 95 int render_process_id, int render_view_id) {
96 NOTREACHED(); 96 NOTREACHED();
97 } 97 }
98 98
99 bool FakeSpeechRecognitionManager::HasAudioInputDevices() { return true; } 99 bool FakeSpeechRecognitionManager::HasAudioInputDevices() { return true; }
100 100
101 bool FakeSpeechRecognitionManager::IsCapturingAudio() { return true; }
102
103 string16 FakeSpeechRecognitionManager::GetAudioInputDeviceModel() { 101 string16 FakeSpeechRecognitionManager::GetAudioInputDeviceModel() {
104 return string16(); 102 return string16();
105 } 103 }
106 104
107 int FakeSpeechRecognitionManager::GetSession(int render_process_id, 105 int FakeSpeechRecognitionManager::GetSession(int render_process_id,
108 int render_view_id, 106 int render_view_id,
109 int request_id) const { 107 int request_id) const {
110 return session_ctx_.render_process_id == render_process_id && 108 return session_ctx_.render_process_id == render_process_id &&
111 session_ctx_.render_view_id == render_view_id && 109 session_ctx_.render_view_id == render_view_id &&
112 session_ctx_.request_id == request_id; 110 session_ctx_.request_id == request_id;
(...skipping 23 matching lines...) Expand all
136 SpeechRecognitionResults results; 134 SpeechRecognitionResults results;
137 results.push_back(result); 135 results.push_back(result);
138 listener_->OnRecognitionResults(session_id_, results); 136 listener_->OnRecognitionResults(session_id_, results);
139 listener_->OnRecognitionEnd(session_id_); 137 listener_->OnRecognitionEnd(session_id_);
140 session_id_ = 0; 138 session_id_ = 0;
141 listener_ = NULL; 139 listener_ = NULL;
142 VLOG(1) << "Finished setting fake recognition result."; 140 VLOG(1) << "Finished setting fake recognition result.";
143 } 141 }
144 142
145 } // namespace content 143 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/fake_speech_recognition_manager.h ('k') | media/audio/audio_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698