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

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: Rebase 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
« no previous file with comments | « remoting/host/disconnect_window_linux.cc ('k') | remoting/host/plugin/host_plugin_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..b53e104a3e65591d4f1bc230c8b8309fb4b1ec94 100644
--- a/remoting/host/plugin/host_plugin_utils.h
+++ b/remoting/host/plugin/host_plugin_utils.h
@@ -30,6 +30,25 @@ NPVariant NPVariantFromString(const std::string& val);
// Convert an NPVariant into an NSPObject.
NPObject* ObjectFromNPVariant(const NPVariant& variant);
+// Scoped reference pointer for NPObjects. All objects using this class
+// must be owned by g_npnetscape_funcs.
+class ScopedRefNPObject {
+ public:
+ ScopedRefNPObject();
+ ~ScopedRefNPObject();
+
+ // Release the held reference and replace it with |object|, incrementing
+ // its reference count.
+ ScopedRefNPObject& operator=(NPObject* object);
Sergey Ulanov 2011/08/30 17:36:51 FYI: Operator overloading is prohibited by code st
+
+ NPObject* get() { return object_; }
+
+ private:
+ NPObject* object_;
+
+ DISALLOW_COPY_AND_ASSIGN(ScopedRefNPObject);
+};
+
} // namespace remoting
#endif // REMOTING_HOST_PLUGIN_HOST_PLUGIN_UTILS_H_
« no previous file with comments | « remoting/host/disconnect_window_linux.cc ('k') | remoting/host/plugin/host_plugin_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698