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

Unified Diff: chrome/browser/speech/speech_input_extension_manager.cc

Issue 9369009: Make content::ResourceContext be a real interface like the rest of the Content API (i.e. don't ha... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 8 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/speech/speech_input_extension_manager.h ('k') | chrome/test/base/in_process_browser_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/speech/speech_input_extension_manager.cc
===================================================================
--- chrome/browser/speech/speech_input_extension_manager.cc (revision 121250)
+++ chrome/browser/speech/speech_input_extension_manager.cc (working copy)
@@ -513,14 +513,14 @@
BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
base::Bind(&SpeechInputExtensionManager::StartOnIOThread, this,
- profile_->GetRequestContext(), &profile_->GetResourceContext(),
+ profile_->GetRequestContext(), profile_->GetResourceContext(),
language, grammar, filter_profanities));
return true;
}
void SpeechInputExtensionManager::StartOnIOThread(
net::URLRequestContextGetter* context_getter,
- const content::ResourceContext* resource_context,
+ content::ResourceContext* resource_context,
const std::string& language,
const std::string& grammar,
bool filter_profanities) {
@@ -555,17 +555,17 @@
}
bool SpeechInputExtensionManager::HasAudioInputDevices(
- const content::ResourceContext* resource_context) {
+ content::ResourceContext* resource_context) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
DCHECK(resource_context);
- return resource_context->audio_manager()->HasAudioInputDevices();
+ return resource_context->GetAudioManager()->HasAudioInputDevices();
}
bool SpeechInputExtensionManager::IsRecordingInProcess(
- const content::ResourceContext* resource_context) {
+ content::ResourceContext* resource_context) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
DCHECK(resource_context);
- return resource_context->audio_manager()->IsRecordingInProcess();
+ return resource_context->GetAudioManager()->IsRecordingInProcess();
}
void SpeechInputExtensionManager::IsRecording(
@@ -573,12 +573,12 @@
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
base::Bind(&SpeechInputExtensionManager::IsRecordingOnIOThread,
- this, callback, &profile_->GetResourceContext()));
+ this, callback, profile_->GetResourceContext()));
}
void SpeechInputExtensionManager::IsRecordingOnIOThread(
const IsRecordingCallback& callback,
- const content::ResourceContext* resource_context) {
+ content::ResourceContext* resource_context) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
DCHECK(resource_context);
@@ -599,7 +599,7 @@
void SpeechInputExtensionManager::StartRecording(
speech_input::SpeechRecognizerDelegate* delegate,
net::URLRequestContextGetter* context_getter,
- const content::ResourceContext* resource_context,
+ content::ResourceContext* resource_context,
int caller_id,
const std::string& language,
const std::string& grammar,
@@ -608,7 +608,7 @@
DCHECK(resource_context);
DCHECK(!recognizer_);
recognizer_ = new SpeechRecognizer(delegate, caller_id, language, grammar,
- context_getter, resource_context->audio_manager(),
+ context_getter, resource_context->GetAudioManager(),
filter_profanities, "", "");
recognizer_->StartRecording();
}
« no previous file with comments | « chrome/browser/speech/speech_input_extension_manager.h ('k') | chrome/test/base/in_process_browser_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698