| Index: remoting/host/plugin/host_plugin_utils.h
|
| diff --git a/remoting/host/plugin/host_plugin_utils.h b/remoting/host/plugin/host_plugin_utils.h
|
| index 363da4f99a596869b541568728a7633d570189a5..02b413aafb31bb27bea90a14066e8a4105f03c09 100644
|
| --- a/remoting/host/plugin/host_plugin_utils.h
|
| +++ b/remoting/host/plugin/host_plugin_utils.h
|
| @@ -30,6 +30,20 @@ NPVariant NPVariantFromString(const std::string& val);
|
| // Convert an NPVariant into an NSPObject.
|
| NPObject* ObjectFromNPVariant(const NPVariant& variant);
|
|
|
| +// Scoped pointer for NPObjects. All objects using this class must be
|
| +// owned by g_npnetscape_funcs.
|
| +class scoped_NPObject {
|
| + public:
|
| + scoped_NPObject();
|
| + ~scoped_NPObject();
|
| +
|
| + void replace(NPObject* object);
|
| + NPObject* get() { return object_; }
|
| +
|
| + private:
|
| + NPObject* object_;
|
| +};
|
| +
|
| } // namespace remoting
|
|
|
| #endif // REMOTING_HOST_PLUGIN_HOST_PLUGIN_UTILS_H_
|
|
|