| 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_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_AUDIO_OUTPUT_H_ |
| 6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_AUDIO_OUTPUT_H_ | 6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_AUDIO_OUTPUT_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 // Stops the playback. Returns false on error or if called before the stream | 41 // Stops the playback. Returns false on error or if called before the stream |
| 42 // is created or after the stream is closed. | 42 // is created or after the stream is closed. |
| 43 bool StopPlayback(); | 43 bool StopPlayback(); |
| 44 | 44 |
| 45 // Closes the stream. Make sure to call this before the object is | 45 // Closes the stream. Make sure to call this before the object is |
| 46 // destructed. | 46 // destructed. |
| 47 void ShutDown(); | 47 void ShutDown(); |
| 48 | 48 |
| 49 // media::AudioOutputIPCDelegate implementation. | 49 // media::AudioOutputIPCDelegate implementation. |
| 50 void OnStateChanged(media::AudioOutputIPCDelegateState state) override; | 50 void OnStateChanged(media::AudioOutputIPCDelegateState state) override; |
| 51 void OnDeviceAuthorized(bool success, |
| 52 const media::AudioParameters& output_params) override; |
| 51 void OnStreamCreated(base::SharedMemoryHandle handle, | 53 void OnStreamCreated(base::SharedMemoryHandle handle, |
| 52 base::SyncSocket::Handle socket_handle, | 54 base::SyncSocket::Handle socket_handle, |
| 53 int length) override; | 55 int length) override; |
| 54 void OnOutputDeviceSwitched(int request_id, | 56 void OnOutputDeviceSwitched(media::SwitchOutputDeviceResult result) override; |
| 55 media::SwitchOutputDeviceResult result) override; | |
| 56 void OnIPCClosed() override; | 57 void OnIPCClosed() override; |
| 57 | 58 |
| 58 protected: | 59 protected: |
| 59 ~PepperPlatformAudioOutput() override; | 60 ~PepperPlatformAudioOutput() override; |
| 60 | 61 |
| 61 private: | 62 private: |
| 62 friend class base::RefCountedThreadSafe<PepperPlatformAudioOutput>; | 63 friend class base::RefCountedThreadSafe<PepperPlatformAudioOutput>; |
| 63 | 64 |
| 64 PepperPlatformAudioOutput(); | 65 PepperPlatformAudioOutput(); |
| 65 | 66 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 84 | 85 |
| 85 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; | 86 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; |
| 86 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; | 87 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; |
| 87 | 88 |
| 88 DISALLOW_COPY_AND_ASSIGN(PepperPlatformAudioOutput); | 89 DISALLOW_COPY_AND_ASSIGN(PepperPlatformAudioOutput); |
| 89 }; | 90 }; |
| 90 | 91 |
| 91 } // namespace content | 92 } // namespace content |
| 92 | 93 |
| 93 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_AUDIO_OUTPUT_H_ | 94 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_AUDIO_OUTPUT_H_ |
| OLD | NEW |