Chromium Code Reviews| 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_PPB_AUDIO_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PPB_AUDIO_IMPL_H_ |
| 6 #define CONTENT_RENDERER_PEPPER_PPB_AUDIO_IMPL_H_ | 6 #define CONTENT_RENDERER_PEPPER_PPB_AUDIO_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 43 // PPB_Audio_API implementation. | 43 // PPB_Audio_API implementation. |
| 44 PP_Resource GetCurrentConfig() override; | 44 PP_Resource GetCurrentConfig() override; |
| 45 PP_Bool StartPlayback() override; | 45 PP_Bool StartPlayback() override; |
| 46 PP_Bool StopPlayback() override; | 46 PP_Bool StopPlayback() override; |
| 47 int32_t Open(PP_Resource config_id, | 47 int32_t Open(PP_Resource config_id, |
| 48 scoped_refptr<ppapi::TrackedCallback> create_callback) override; | 48 scoped_refptr<ppapi::TrackedCallback> create_callback) override; |
| 49 int32_t GetSyncSocket(int* sync_socket) override; | 49 int32_t GetSyncSocket(int* sync_socket) override; |
| 50 int32_t GetSharedMemory(base::SharedMemory** shm, | 50 int32_t GetSharedMemory(base::SharedMemory** shm, |
| 51 uint32_t* shm_size) override; | 51 uint32_t* shm_size) override; |
| 52 | 52 |
| 53 void SetVolume(double volume); | |
| 54 | |
| 55 int32_t pepper_audio_id() { return pepper_audio_id_; } | |
|
bbudge
2016/06/13 17:51:01
This doesn't seem to be used anywhere. Is it for t
Zhiqiang Zhang (Slow)
2016/06/14 14:15:26
Sorry. This was in an experimental patch, and it's
| |
| 56 | |
| 53 private: | 57 private: |
| 54 ~PPB_Audio_Impl() override; | 58 ~PPB_Audio_Impl() override; |
| 55 | 59 |
| 56 // AudioHelper implementation. | 60 // AudioHelper implementation. |
| 57 void OnSetStreamInfo(base::SharedMemoryHandle shared_memory_handle, | 61 void OnSetStreamInfo(base::SharedMemoryHandle shared_memory_handle, |
| 58 size_t shared_memory_size_, | 62 size_t shared_memory_size_, |
| 59 base::SyncSocket::Handle socket) override; | 63 base::SyncSocket::Handle socket) override; |
| 60 | 64 |
| 61 // PluginInstanceThrottler::Observer implementation. | 65 // PluginInstanceThrottler::Observer implementation. |
| 62 void OnThrottleStateChange() override; | 66 void OnThrottleStateChange() override; |
| 63 | 67 |
| 64 // Starts the deferred playback and unsubscribes from the throttler. | 68 // Starts the deferred playback and unsubscribes from the throttler. |
| 65 void StartDeferredPlayback(); | 69 void StartDeferredPlayback(); |
| 66 | 70 |
| 67 // AudioConfig used for creating this Audio object. We own a ref. | 71 // AudioConfig used for creating this Audio object. We own a ref. |
| 68 ppapi::ScopedPPResource config_; | 72 ppapi::ScopedPPResource config_; |
| 69 | 73 |
| 70 // PluginDelegate audio object that we delegate audio IPC through. We don't | 74 // PluginDelegate audio object that we delegate audio IPC through. We don't |
| 71 // own this pointer but are responsible for calling Shutdown on it. | 75 // own this pointer but are responsible for calling Shutdown on it. |
| 72 PepperPlatformAudioOutput* audio_; | 76 PepperPlatformAudioOutput* audio_; |
| 73 | 77 |
| 74 // Stream is playing, but throttled due to Plugin Power Saver. | 78 // Stream is playing, but throttled due to Plugin Power Saver. |
| 75 bool playback_throttled_; | 79 bool playback_throttled_; |
| 76 | 80 |
| 81 int32_t pepper_audio_id_; | |
| 82 | |
| 77 DISALLOW_COPY_AND_ASSIGN(PPB_Audio_Impl); | 83 DISALLOW_COPY_AND_ASSIGN(PPB_Audio_Impl); |
| 78 }; | 84 }; |
| 79 | 85 |
| 80 } // namespace content | 86 } // namespace content |
| 81 | 87 |
| 82 #endif // CONTENT_RENDERER_PEPPER_PPB_AUDIO_IMPL_H_ | 88 #endif // CONTENT_RENDERER_PEPPER_PPB_AUDIO_IMPL_H_ |
| OLD | NEW |