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

Unified Diff: content/browser/speech/speech_input_manager.h

Issue 8818012: Remove the AudioManager singleton. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Set svn eol properties for a couple of files Created 9 years 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
Index: content/browser/speech/speech_input_manager.h
===================================================================
--- content/browser/speech/speech_input_manager.h (revision 114012)
+++ content/browser/speech/speech_input_manager.h (working copy)
@@ -16,6 +16,7 @@
class SpeechInputPreferences;
namespace content {
+class ResourceContext;
struct SpeechInputResult;
}
@@ -50,8 +51,14 @@
// Invokes the platform provided microphone settings UI in a non-blocking way,
// via the BrowserThread::FILE thread.
- static void ShowAudioInputSettings();
+ static void ShowAudioInputSettings(AudioManager* audio_manager);
+ // Same as ShowAudioInputSettings above but can be called from the UI thread
+ // where the caller has a pointer to a resource context, but due to not
+ // running on the IO thread, cannot access its properties.
+ static void ShowAudioInputSettingsFromUI(
+ const content::ResourceContext* resource_context);
+
virtual ~SpeechInputManager();
// Handlers for requests from render views.
@@ -71,7 +78,8 @@
const std::string& grammar,
const std::string& origin_url,
net::URLRequestContextGetter* context_getter,
- SpeechInputPreferences* speech_input_prefs);
+ SpeechInputPreferences* speech_input_prefs,
+ AudioManager* audio_manager);
virtual void CancelRecognition(int caller_id);
virtual void CancelAllRequestsWithDelegate(Delegate* delegate);
virtual void StopRecording(int caller_id);
@@ -97,7 +105,8 @@
// recognition and for fetching optional request information.
// Get the optional request information if available.
- virtual void GetRequestInfo(bool* can_report_metrics,
+ virtual void GetRequestInfo(AudioManager* audio_manager,
+ bool* can_report_metrics,
std::string* request_info) = 0;
// Called when recognition has been requested from point |element_rect_| on
« no previous file with comments | « content/browser/speech/speech_input_dispatcher_host.cc ('k') | content/browser/speech/speech_input_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698