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

Unified Diff: remoting/host/plugin/host_plugin_utils.h

Issue 7635012: Host process i18n and Linux implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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: 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_;
+};
Wez 2011/08/13 01:35:32 This should really be scoped_refNPObject, I think,
Jamie 2011/08/13 02:20:15 I've taken Sergey's suggestion of calling it Scope
Jamie 2011/08/15 17:21:03 Actually, now I think about it, it does affect the
+
} // namespace remoting
#endif // REMOTING_HOST_PLUGIN_HOST_PLUGIN_UTILS_H_

Powered by Google App Engine
This is Rietveld 408576698