Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1652)

Unified Diff: ppapi/shared_impl/audio_config_impl.h

Issue 7621070: Merge the plugin and impl side of the audio config and input event resources. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed compile issues Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ppapi/shared_impl/audio_config_impl.h
diff --git a/ppapi/shared_impl/audio_config_impl.h b/ppapi/shared_impl/audio_config_impl.h
index 079df7602cb467c7c2c67d14820906379c1e7c7a..d0e67f692a058885a298d20f8fdb83e72f61bffb 100644
--- a/ppapi/shared_impl/audio_config_impl.h
+++ b/ppapi/shared_impl/audio_config_impl.h
@@ -12,21 +12,34 @@
namespace ppapi {
-class AudioConfigImpl : public thunk::PPB_AudioConfig_API {
+class AudioConfigImpl : public Resource,
+ public thunk::PPB_AudioConfig_API {
public:
- // You must call Init before using this object.
- AudioConfigImpl();
virtual ~AudioConfigImpl();
- // Returns false if the arguments are invalid, the object should not be
- // used in this case.
- bool Init(PP_AudioSampleRate sample_rate, uint32_t sample_frame_count);
+ static PP_Resource CreateAsImpl(PP_Instance instance,
+ PP_AudioSampleRate sample_rate,
+ uint32_t sample_frame_count);
+ static PP_Resource CreateAsProxy(PP_Instance instance,
+ PP_AudioSampleRate sample_rate,
+ uint32_t sample_frame_count);
+
+ // Resource overrides.
+ virtual thunk::PPB_AudioConfig_API* AsPPB_AudioConfig_API() OVERRIDE;
// PPB_AudioConfig_API implementation.
virtual PP_AudioSampleRate GetSampleRate() OVERRIDE;
virtual uint32_t GetSampleFrameCount() OVERRIDE;
private:
+ // You must call Init before using this object.
+ AudioConfigImpl(PP_Instance instance); // Impl constructor.
+ AudioConfigImpl(const HostResource& host_resource); // Proxy constructor.
yzshen1 2011/08/22 17:37:00 It may be good to mark them as 'explicit'.
+
+ // Returns false if the arguments are invalid, the object should not be
+ // used in this case.
+ bool Init(PP_AudioSampleRate sample_rate, uint32_t sample_frame_count);
+
PP_AudioSampleRate sample_rate_;
uint32_t sample_frame_count_;

Powered by Google App Engine
This is Rietveld 408576698