| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 class ResourceContext; | 63 class ResourceContext; |
| 64 | 64 |
| 65 class CONTENT_EXPORT AudioRendererHost | 65 class CONTENT_EXPORT AudioRendererHost |
| 66 : public BrowserMessageFilter, | 66 : public BrowserMessageFilter, |
| 67 public media::AudioOutputController::EventHandler { | 67 public media::AudioOutputController::EventHandler { |
| 68 public: | 68 public: |
| 69 // Called from UI thread from the owner of this object. | 69 // Called from UI thread from the owner of this object. |
| 70 AudioRendererHost(media::AudioManager* audio_manager, | 70 AudioRendererHost(media::AudioManager* audio_manager, |
| 71 MediaObserver* media_observer); | 71 MediaObserver* media_observer); |
| 72 | 72 |
| 73 // content::BrowserMessageFilter implementation. | 73 // BrowserMessageFilter implementation. |
| 74 virtual void OnChannelClosing() OVERRIDE; | 74 virtual void OnChannelClosing() OVERRIDE; |
| 75 virtual void OnDestruct() const OVERRIDE; | 75 virtual void OnDestruct() const OVERRIDE; |
| 76 virtual bool OnMessageReceived(const IPC::Message& message, | 76 virtual bool OnMessageReceived(const IPC::Message& message, |
| 77 bool* message_was_ok) OVERRIDE; | 77 bool* message_was_ok) OVERRIDE; |
| 78 | 78 |
| 79 // AudioOutputController::EventHandler implementations. | 79 // AudioOutputController::EventHandler implementations. |
| 80 virtual void OnCreated(media::AudioOutputController* controller) OVERRIDE; | 80 virtual void OnCreated(media::AudioOutputController* controller) OVERRIDE; |
| 81 virtual void OnPlaying(media::AudioOutputController* controller) OVERRIDE; | 81 virtual void OnPlaying(media::AudioOutputController* controller) OVERRIDE; |
| 82 virtual void OnPaused(media::AudioOutputController* controller) OVERRIDE; | 82 virtual void OnPaused(media::AudioOutputController* controller) OVERRIDE; |
| 83 virtual void OnError(media::AudioOutputController* controller, | 83 virtual void OnError(media::AudioOutputController* controller, |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 | 165 |
| 166 media::AudioManager* audio_manager_; | 166 media::AudioManager* audio_manager_; |
| 167 MediaObserver* media_observer_; | 167 MediaObserver* media_observer_; |
| 168 | 168 |
| 169 DISALLOW_COPY_AND_ASSIGN(AudioRendererHost); | 169 DISALLOW_COPY_AND_ASSIGN(AudioRendererHost); |
| 170 }; | 170 }; |
| 171 | 171 |
| 172 } // namespace content | 172 } // namespace content |
| 173 | 173 |
| 174 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_RENDERER_HOST_H_ | 174 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_RENDERER_HOST_H_ |
| OLD | NEW |