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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 AudioMirroringManager* mirroring_manager, | 74 AudioMirroringManager* mirroring_manager, |
75 MediaInternals* media_internals, | 75 MediaInternals* media_internals, |
76 MediaStreamManager* media_stream_manager); | 76 MediaStreamManager* media_stream_manager); |
77 | 77 |
78 // Calls |callback| with the list of AudioOutputControllers for this object. | 78 // Calls |callback| with the list of AudioOutputControllers for this object. |
79 void GetOutputControllers( | 79 void GetOutputControllers( |
80 int render_view_id, | 80 int render_view_id, |
81 const RenderViewHost::GetAudioOutputControllersCallback& callback) const; | 81 const RenderViewHost::GetAudioOutputControllersCallback& callback) const; |
82 | 82 |
83 // BrowserMessageFilter implementation. | 83 // BrowserMessageFilter implementation. |
84 virtual void OnChannelClosing() OVERRIDE; | 84 virtual void OnChannelClosing() override; |
85 virtual void OnDestruct() const OVERRIDE; | 85 virtual void OnDestruct() const override; |
86 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 86 virtual bool OnMessageReceived(const IPC::Message& message) override; |
87 | 87 |
88 // Returns true if any streams managed by this host are actively playing. Can | 88 // Returns true if any streams managed by this host are actively playing. Can |
89 // be called from any thread. | 89 // be called from any thread. |
90 bool HasActiveAudio(); | 90 bool HasActiveAudio(); |
91 | 91 |
92 private: | 92 private: |
93 friend class AudioRendererHostTest; | 93 friend class AudioRendererHostTest; |
94 friend class BrowserThread; | 94 friend class BrowserThread; |
95 friend class base::DeleteHelper<AudioRendererHost>; | 95 friend class base::DeleteHelper<AudioRendererHost>; |
96 friend class MockAudioRendererHost; | 96 friend class MockAudioRendererHost; |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 | 172 |
173 // The number of streams in the playing state. | 173 // The number of streams in the playing state. |
174 base::AtomicRefCount num_playing_streams_; | 174 base::AtomicRefCount num_playing_streams_; |
175 | 175 |
176 DISALLOW_COPY_AND_ASSIGN(AudioRendererHost); | 176 DISALLOW_COPY_AND_ASSIGN(AudioRendererHost); |
177 }; | 177 }; |
178 | 178 |
179 } // namespace content | 179 } // namespace content |
180 | 180 |
181 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_RENDERER_HOST_H_ | 181 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_RENDERER_HOST_H_ |
OLD | NEW |