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 PPAPI_SHARED_IMPL_PPB_AUDIO_CONFIG_SHARED_H_ | 5 #ifndef PPAPI_SHARED_IMPL_PPB_AUDIO_CONFIG_SHARED_H_ |
6 #define PPAPI_SHARED_IMPL_PPB_AUDIO_CONFIG_SHARED_H_ | 6 #define PPAPI_SHARED_IMPL_PPB_AUDIO_CONFIG_SHARED_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "ppapi/shared_impl/resource.h" | 10 #include "ppapi/shared_impl/resource.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 | 31 |
32 // Resource overrides. | 32 // Resource overrides. |
33 virtual thunk::PPB_AudioConfig_API* AsPPB_AudioConfig_API() OVERRIDE; | 33 virtual thunk::PPB_AudioConfig_API* AsPPB_AudioConfig_API() OVERRIDE; |
34 | 34 |
35 // PPB_AudioConfig_API implementation. | 35 // PPB_AudioConfig_API implementation. |
36 virtual PP_AudioSampleRate GetSampleRate() OVERRIDE; | 36 virtual PP_AudioSampleRate GetSampleRate() OVERRIDE; |
37 virtual uint32_t GetSampleFrameCount() OVERRIDE; | 37 virtual uint32_t GetSampleFrameCount() OVERRIDE; |
38 | 38 |
39 private: | 39 private: |
40 // You must call Init before using this object. | 40 // You must call Init before using this object. |
41 explicit PPB_AudioConfig_Shared(ResourceObjectType type, | 41 PPB_AudioConfig_Shared(ResourceObjectType type, PP_Instance instance); |
42 PP_Instance instance); | |
43 | 42 |
44 // Returns false if the arguments are invalid, the object should not be | 43 // Returns false if the arguments are invalid, the object should not be |
45 // used in this case. | 44 // used in this case. |
46 bool Init(PP_AudioSampleRate sample_rate, uint32_t sample_frame_count); | 45 bool Init(PP_AudioSampleRate sample_rate, uint32_t sample_frame_count); |
47 | 46 |
48 PP_AudioSampleRate sample_rate_; | 47 PP_AudioSampleRate sample_rate_; |
49 uint32_t sample_frame_count_; | 48 uint32_t sample_frame_count_; |
50 | 49 |
51 DISALLOW_COPY_AND_ASSIGN(PPB_AudioConfig_Shared); | 50 DISALLOW_COPY_AND_ASSIGN(PPB_AudioConfig_Shared); |
52 }; | 51 }; |
53 | 52 |
54 } // namespace ppapi | 53 } // namespace ppapi |
55 | 54 |
56 #endif // PPAPI_SHARED_IMPL_PPB_AUDIO_CONFIG_SHARED_H_ | 55 #endif // PPAPI_SHARED_IMPL_PPB_AUDIO_CONFIG_SHARED_H_ |
OLD | NEW |