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

Side by Side Diff: content/browser/renderer_host/media/audio_input_renderer_host.h

Issue 2517953003: Move enable_webrtc to a buildflag header. (Closed)
Patch Set: Fix Created 4 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 unified diff | Download patch
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 // AudioInputRendererHost serves audio related requests from audio capturer 5 // AudioInputRendererHost serves audio related requests from audio capturer
6 // which lives inside the render process and provide access to audio hardware. 6 // which lives inside the render process and provide access to audio hardware.
7 // 7 //
8 // Create stream sequence (AudioInputController = AIC): 8 // Create stream sequence (AudioInputController = AIC):
9 // 9 //
10 // AudioInputHostMsg_CreateStream -> OnCreateStream -> AIC::CreateLowLatency -> 10 // AudioInputHostMsg_CreateStream -> OnCreateStream -> AIC::CreateLowLatency ->
(...skipping 25 matching lines...) Expand all
36 #include "base/memory/weak_ptr.h" 36 #include "base/memory/weak_ptr.h"
37 #include "base/process/process.h" 37 #include "base/process/process.h"
38 #include "base/sequenced_task_runner_helpers.h" 38 #include "base/sequenced_task_runner_helpers.h"
39 #include "content/common/media/audio_messages.h" 39 #include "content/common/media/audio_messages.h"
40 #include "content/public/browser/browser_message_filter.h" 40 #include "content/public/browser/browser_message_filter.h"
41 #include "content/public/browser/browser_thread.h" 41 #include "content/public/browser/browser_thread.h"
42 #include "media/audio/audio_input_controller.h" 42 #include "media/audio/audio_input_controller.h"
43 #include "media/audio/audio_io.h" 43 #include "media/audio/audio_io.h"
44 #include "media/audio/audio_logging.h" 44 #include "media/audio/audio_logging.h"
45 #include "media/audio/simple_sources.h" 45 #include "media/audio/simple_sources.h"
46 #include "media/media_features.h"
46 47
47 namespace media { 48 namespace media {
48 class AudioManager; 49 class AudioManager;
49 class UserInputMonitor; 50 class UserInputMonitor;
50 } 51 }
51 52
52 namespace content { 53 namespace content {
53 class AudioMirroringManager; 54 class AudioMirroringManager;
54 class MediaStreamManager; 55 class MediaStreamManager;
55 class RenderProcessHost; 56 class RenderProcessHost;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 103
103 // Called from UI thread from the owner of this object. 104 // Called from UI thread from the owner of this object.
104 // |user_input_monitor| is used for typing detection and can be NULL. 105 // |user_input_monitor| is used for typing detection and can be NULL.
105 AudioInputRendererHost(int render_process_id, 106 AudioInputRendererHost(int render_process_id,
106 int32_t renderer_pid, 107 int32_t renderer_pid,
107 media::AudioManager* audio_manager, 108 media::AudioManager* audio_manager,
108 MediaStreamManager* media_stream_manager, 109 MediaStreamManager* media_stream_manager,
109 AudioMirroringManager* audio_mirroring_manager, 110 AudioMirroringManager* audio_mirroring_manager,
110 media::UserInputMonitor* user_input_monitor); 111 media::UserInputMonitor* user_input_monitor);
111 112
112 #if defined(ENABLE_WEBRTC) 113 #if BUILDFLAG(ENABLE_WEBRTC)
113 // Enable and disable debug recording of input on all audio entries. 114 // Enable and disable debug recording of input on all audio entries.
114 void EnableDebugRecording(const base::FilePath& file); 115 void EnableDebugRecording(const base::FilePath& file);
115 void DisableDebugRecording(); 116 void DisableDebugRecording();
116 #endif 117 #endif
117 118
118 // BrowserMessageFilter implementation. 119 // BrowserMessageFilter implementation.
119 void OnChannelClosing() override; 120 void OnChannelClosing() override;
120 void OnDestruct() const override; 121 void OnDestruct() const override;
121 bool OnMessageReceived(const IPC::Message& message) override; 122 bool OnMessageReceived(const IPC::Message& message) override;
122 123
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 // Search for a AudioEntry having the reference to |controller|. 216 // Search for a AudioEntry having the reference to |controller|.
216 // This method is used to look up an AudioEntry after a controller 217 // This method is used to look up an AudioEntry after a controller
217 // event is received. 218 // event is received.
218 AudioEntry* LookupByController(media::AudioInputController* controller); 219 AudioEntry* LookupByController(media::AudioInputController* controller);
219 220
220 // If ChromeOS and |config|'s layout has keyboard mic, unregister in 221 // If ChromeOS and |config|'s layout has keyboard mic, unregister in
221 // AudioInputDeviceManager. 222 // AudioInputDeviceManager.
222 void MaybeUnregisterKeyboardMicStream( 223 void MaybeUnregisterKeyboardMicStream(
223 const AudioInputHostMsg_CreateStream_Config& config); 224 const AudioInputHostMsg_CreateStream_Config& config);
224 225
225 #if defined(ENABLE_WEBRTC) 226 #if BUILDFLAG(ENABLE_WEBRTC)
226 void MaybeEnableDebugRecordingForId(int stream_id); 227 void MaybeEnableDebugRecordingForId(int stream_id);
227 228
228 base::FilePath GetDebugRecordingFilePathWithExtensions( 229 base::FilePath GetDebugRecordingFilePathWithExtensions(
229 const base::FilePath& file); 230 const base::FilePath& file);
230 231
231 void EnableDebugRecordingForId(const base::FilePath& file, int stream_id); 232 void EnableDebugRecordingForId(const base::FilePath& file, int stream_id);
232 233
233 void DoEnableDebugRecording(int stream_id, base::File file); 234 void DoEnableDebugRecording(int stream_id, base::File file);
234 void DoDisableDebugRecording(int stream_id); 235 void DoDisableDebugRecording(int stream_id);
235 236
(...skipping 25 matching lines...) Expand all
261 std::unique_ptr<media::AudioLog> audio_log_; 262 std::unique_ptr<media::AudioLog> audio_log_;
262 263
263 base::WeakPtrFactory<AudioInputRendererHost> weak_factory_; 264 base::WeakPtrFactory<AudioInputRendererHost> weak_factory_;
264 265
265 DISALLOW_COPY_AND_ASSIGN(AudioInputRendererHost); 266 DISALLOW_COPY_AND_ASSIGN(AudioInputRendererHost);
266 }; 267 };
267 268
268 } // namespace content 269 } // namespace content
269 270
270 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_RENDERER_HOST_H_ 271 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_RENDERER_HOST_H_
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_process_host.cc ('k') | content/browser/renderer_host/media/audio_input_renderer_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698