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

Unified Diff: content/browser/renderer_host/media/audio_input_renderer_host.h

Issue 599443003: Activate and inactivate keyboard mic on ChromeOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@check_kmic_set_effect
Patch Set: Code review fix. Created 6 years, 3 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
Index: content/browser/renderer_host/media/audio_input_renderer_host.h
diff --git a/content/browser/renderer_host/media/audio_input_renderer_host.h b/content/browser/renderer_host/media/audio_input_renderer_host.h
index 7bd6692eabb28a683f378ef942f0e67667d37829..50130b803b955dadfed0591c1dddd160d3f374f2 100644
--- a/content/browser/renderer_host/media/audio_input_renderer_host.h
+++ b/content/browser/renderer_host/media/audio_input_renderer_host.h
@@ -136,12 +136,20 @@ class CONTENT_EXPORT AudioInputRendererHost
// Audio related IPC message handlers.
+ // For ChromeOS: Checks if the stream should contain keyboard mic, if so
+ // registers to AudioInputDeviceManager. Then calls DoCreateStream.
+ // For non-ChromeOS: Just calls DoCreateStream.
+ void OnCreateStream(int stream_id,
+ int render_view_id,
+ int session_id,
+ const AudioInputHostMsg_CreateStream_Config& config);
+
// Creates an audio input stream with the specified format whose data is
// consumed by an entity in the render view referenced by |render_view_id|.
// |session_id| is used to find out which device to be used for the stream.
// Upon success/failure, the peer is notified via the
// NotifyStreamCreated message.
- void OnCreateStream(int stream_id,
+ void DoCreateStream(int stream_id,
int render_view_id,
int session_id,
const AudioInputHostMsg_CreateStream_Config& config);
@@ -196,6 +204,11 @@ class CONTENT_EXPORT AudioInputRendererHost
// event is received.
AudioEntry* LookupByController(media::AudioInputController* controller);
+ // If ChromeOS and |config|'s layout has keyboard mic, unregister in
+ // AudioInputDeviceManager.
+ void MaybeUnregisterKeyboardMicStream(
+ const AudioInputHostMsg_CreateStream_Config& config);
+
// Used to create an AudioInputController.
media::AudioManager* audio_manager_;

Powered by Google App Engine
This is Rietveld 408576698