| 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 "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 // Stops the playback. Returns false on error or if called before the stream | 42 // Stops the playback. Returns false on error or if called before the stream |
| 43 // is created or after the stream is closed. | 43 // is created or after the stream is closed. |
| 44 bool StopPlayback(); | 44 bool StopPlayback(); |
| 45 | 45 |
| 46 // Closes the stream. Make sure to call this before the object is | 46 // Closes the stream. Make sure to call this before the object is |
| 47 // destructed. | 47 // destructed. |
| 48 void ShutDown(); | 48 void ShutDown(); |
| 49 | 49 |
| 50 // media::AudioOutputIPCDelegate implementation. | 50 // media::AudioOutputIPCDelegate implementation. |
| 51 virtual void OnStateChanged(media::AudioOutputIPCDelegate::State state) | 51 void OnStateChanged(media::AudioOutputIPCDelegate::State state) override; |
| 52 override; | 52 void OnStreamCreated(base::SharedMemoryHandle handle, |
| 53 virtual void OnStreamCreated(base::SharedMemoryHandle handle, | 53 base::SyncSocket::Handle socket_handle, |
| 54 base::SyncSocket::Handle socket_handle, | 54 int length) override; |
| 55 int length) override; | 55 void OnIPCClosed() override; |
| 56 virtual void OnIPCClosed() override; | |
| 57 | 56 |
| 58 protected: | 57 protected: |
| 59 virtual ~PepperPlatformAudioOutput(); | 58 ~PepperPlatformAudioOutput() override; |
| 60 | 59 |
| 61 private: | 60 private: |
| 62 friend class base::RefCountedThreadSafe<PepperPlatformAudioOutput>; | 61 friend class base::RefCountedThreadSafe<PepperPlatformAudioOutput>; |
| 63 | 62 |
| 64 PepperPlatformAudioOutput(); | 63 PepperPlatformAudioOutput(); |
| 65 | 64 |
| 66 bool Initialize(int sample_rate, | 65 bool Initialize(int sample_rate, |
| 67 int frames_per_buffer, | 66 int frames_per_buffer, |
| 68 int source_render_view_id, | 67 int source_render_view_id, |
| 69 int source_render_frame_id, | 68 int source_render_frame_id, |
| (...skipping 15 matching lines...) Expand all Loading... |
| 85 | 84 |
| 86 scoped_refptr<base::MessageLoopProxy> main_message_loop_proxy_; | 85 scoped_refptr<base::MessageLoopProxy> main_message_loop_proxy_; |
| 87 scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_; | 86 scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_; |
| 88 | 87 |
| 89 DISALLOW_COPY_AND_ASSIGN(PepperPlatformAudioOutput); | 88 DISALLOW_COPY_AND_ASSIGN(PepperPlatformAudioOutput); |
| 90 }; | 89 }; |
| 91 | 90 |
| 92 } // namespace content | 91 } // namespace content |
| 93 | 92 |
| 94 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_AUDIO_OUTPUT_IMPL_H_ | 93 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_AUDIO_OUTPUT_IMPL_H_ |
| OLD | NEW |