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