Use ExtensionRegistry::enabled_extensions instead of deprecated ExtensionService...
[chromium-blink-merge.git] / ppapi / proxy / audio_buffer_resource.h
blobb4ef3eb760cde45e1aa3da2407c7c456d6a8eca4
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef PPAPI_PROXY_AUDIO_BUFFER_RESOURCE_H_
6 #define PPAPI_PROXY_AUDIO_BUFFER_RESOURCE_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "ppapi/proxy/ppapi_proxy_export.h"
11 #include "ppapi/shared_impl/resource.h"
12 #include "ppapi/thunk/ppb_audio_buffer_api.h"
14 namespace ppapi {
16 union MediaStreamBuffer;
18 namespace proxy {
20 class PPAPI_PROXY_EXPORT AudioBufferResource
21 : public Resource,
22 public thunk::PPB_AudioBuffer_API {
23 public:
24 AudioBufferResource(PP_Instance instance,
25 int32_t index,
26 MediaStreamBuffer* buffer);
28 virtual ~AudioBufferResource();
30 // PluginResource overrides:
31 virtual thunk::PPB_AudioBuffer_API* AsPPB_AudioBuffer_API() OVERRIDE;
33 // PPB_AudioBuffer_API overrides:
34 virtual PP_TimeDelta GetTimestamp() OVERRIDE;
35 virtual void SetTimestamp(PP_TimeDelta timestamp) OVERRIDE;
36 virtual PP_AudioBuffer_SampleRate GetSampleRate() OVERRIDE;
37 virtual PP_AudioBuffer_SampleSize GetSampleSize() OVERRIDE;
38 virtual uint32_t GetNumberOfChannels() OVERRIDE;
39 virtual uint32_t GetNumberOfSamples() OVERRIDE;
40 virtual void* GetDataBuffer() OVERRIDE;
41 virtual uint32_t GetDataBufferSize() OVERRIDE;
42 virtual MediaStreamBuffer* GetBuffer() OVERRIDE;
43 virtual int32_t GetBufferIndex() OVERRIDE;
44 virtual void Invalidate() OVERRIDE;
46 // Buffer index
47 int32_t index_;
49 MediaStreamBuffer* buffer_;
51 DISALLOW_COPY_AND_ASSIGN(AudioBufferResource);
54 } // namespace proxy
55 } // namespace ppapi
57 #endif // PPAPI_PROXY_AUDIO_BUFFER_RESOURCE_H_