| 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 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_AUDIO_OUTPUT_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_AUDIO_OUTPUT_IMPL_H_ |
| 6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_AUDIO_OUTPUT_IMPL_H_ | 6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_AUDIO_OUTPUT_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "content/renderer/media/audio_message_filter.h" | 10 #include "content/renderer/media/audio_message_filter.h" |
| 11 #include "webkit/plugins/ppapi/plugin_delegate.h" | 11 #include "webkit/plugins/ppapi/plugin_delegate.h" |
| 12 | 12 |
| 13 class AudioParameters; | 13 class AudioParameters; |
| 14 | 14 |
| 15 namespace base { | 15 namespace base { |
| 16 class MessageLoopProxy; | 16 class MessageLoopProxy; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace content { |
| 20 |
| 19 class PepperPlatformAudioOutputImpl | 21 class PepperPlatformAudioOutputImpl |
| 20 : public webkit::ppapi::PluginDelegate::PlatformAudioOutput, | 22 : public webkit::ppapi::PluginDelegate::PlatformAudioOutput, |
| 21 public AudioMessageFilter::Delegate, | 23 public AudioMessageFilter::Delegate, |
| 22 public base::RefCountedThreadSafe<PepperPlatformAudioOutputImpl> { | 24 public base::RefCountedThreadSafe<PepperPlatformAudioOutputImpl> { |
| 23 public: | 25 public: |
| 24 virtual ~PepperPlatformAudioOutputImpl(); | 26 virtual ~PepperPlatformAudioOutputImpl(); |
| 25 | 27 |
| 26 // Factory function, returns NULL on failure. StreamCreated() will be called | 28 // Factory function, returns NULL on failure. StreamCreated() will be called |
| 27 // when the stream is created. | 29 // when the stream is created. |
| 28 static PepperPlatformAudioOutputImpl* Create( | 30 static PepperPlatformAudioOutputImpl* Create( |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 | 67 |
| 66 // Our ID on the MessageFilter. THIS MUST ONLY BE ACCESSED ON THE I/O THREAD | 68 // Our ID on the MessageFilter. THIS MUST ONLY BE ACCESSED ON THE I/O THREAD |
| 67 // or else you could race with the initialize function which sets it. | 69 // or else you could race with the initialize function which sets it. |
| 68 int32 stream_id_; | 70 int32 stream_id_; |
| 69 | 71 |
| 70 base::MessageLoopProxy* main_message_loop_proxy_; | 72 base::MessageLoopProxy* main_message_loop_proxy_; |
| 71 | 73 |
| 72 DISALLOW_COPY_AND_ASSIGN(PepperPlatformAudioOutputImpl); | 74 DISALLOW_COPY_AND_ASSIGN(PepperPlatformAudioOutputImpl); |
| 73 }; | 75 }; |
| 74 | 76 |
| 77 } // namespace content |
| 78 |
| 75 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_AUDIO_OUTPUT_IMPL_H_ | 79 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_AUDIO_OUTPUT_IMPL_H_ |
| OLD | NEW |