| OLD | NEW |
| 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 // AudioRendererHost serves audio related requests from AudioRenderer which | 5 // AudioRendererHost serves audio related requests from AudioRenderer which |
| 6 // lives inside the render process and provide access to audio hardware. | 6 // lives inside the render process and provide access to audio hardware. |
| 7 // | 7 // |
| 8 // This class is owned by BrowserRenderProcessHost, and instantiated on UI | 8 // This class is owned by BrowserRenderProcessHost, and instantiated on UI |
| 9 // thread, but all other operations and method calls happen on IO thread, so we | 9 // thread, but all other operations and method calls happen on IO thread, so we |
| 10 // need to be extra careful about the lifetime of this object. AudioManager is a | 10 // need to be extra careful about the lifetime of this object. AudioManager is a |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 #include "base/gtest_prod_util.h" | 42 #include "base/gtest_prod_util.h" |
| 43 #include "base/memory/ref_counted.h" | 43 #include "base/memory/ref_counted.h" |
| 44 #include "base/memory/scoped_ptr.h" | 44 #include "base/memory/scoped_ptr.h" |
| 45 #include "base/process/process.h" | 45 #include "base/process/process.h" |
| 46 #include "base/sequenced_task_runner_helpers.h" | 46 #include "base/sequenced_task_runner_helpers.h" |
| 47 #include "content/common/content_export.h" | 47 #include "content/common/content_export.h" |
| 48 #include "content/public/browser/browser_message_filter.h" | 48 #include "content/public/browser/browser_message_filter.h" |
| 49 #include "content/public/browser/browser_thread.h" | 49 #include "content/public/browser/browser_thread.h" |
| 50 #include "content/public/browser/render_view_host.h" | 50 #include "content/public/browser/render_view_host.h" |
| 51 #include "media/audio/audio_io.h" | 51 #include "media/audio/audio_io.h" |
| 52 #include "media/audio/audio_logging.h" |
| 52 #include "media/audio/audio_output_controller.h" | 53 #include "media/audio/audio_output_controller.h" |
| 53 #include "media/audio/simple_sources.h" | 54 #include "media/audio/simple_sources.h" |
| 54 | 55 |
| 55 namespace media { | 56 namespace media { |
| 56 class AudioManager; | 57 class AudioManager; |
| 57 class AudioParameters; | 58 class AudioParameters; |
| 58 } | 59 } |
| 59 | 60 |
| 60 namespace content { | 61 namespace content { |
| 61 | 62 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 | 150 |
| 150 // A helper method to look up a AudioEntry identified by |stream_id|. | 151 // A helper method to look up a AudioEntry identified by |stream_id|. |
| 151 // Returns NULL if not found. | 152 // Returns NULL if not found. |
| 152 AudioEntry* LookupById(int stream_id); | 153 AudioEntry* LookupById(int stream_id); |
| 153 | 154 |
| 154 // ID of the RenderProcessHost that owns this instance. | 155 // ID of the RenderProcessHost that owns this instance. |
| 155 const int render_process_id_; | 156 const int render_process_id_; |
| 156 | 157 |
| 157 media::AudioManager* const audio_manager_; | 158 media::AudioManager* const audio_manager_; |
| 158 AudioMirroringManager* const mirroring_manager_; | 159 AudioMirroringManager* const mirroring_manager_; |
| 159 MediaInternals* const media_internals_; | 160 scoped_ptr<media::AudioLog> audio_log_; |
| 160 | 161 |
| 161 // Used to access to AudioInputDeviceManager. | 162 // Used to access to AudioInputDeviceManager. |
| 162 MediaStreamManager* media_stream_manager_; | 163 MediaStreamManager* media_stream_manager_; |
| 163 | 164 |
| 164 // A map of stream IDs to audio sources. | 165 // A map of stream IDs to audio sources. |
| 165 AudioEntryMap audio_entries_; | 166 AudioEntryMap audio_entries_; |
| 166 | 167 |
| 167 DISALLOW_COPY_AND_ASSIGN(AudioRendererHost); | 168 DISALLOW_COPY_AND_ASSIGN(AudioRendererHost); |
| 168 }; | 169 }; |
| 169 | 170 |
| 170 } // namespace content | 171 } // namespace content |
| 171 | 172 |
| 172 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_RENDERER_HOST_H_ | 173 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_RENDERER_HOST_H_ |
| OLD | NEW |