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

Unified Diff: remoting/host/host_plugin_utils.h

Issue 7210025: Split host plugin into multiple files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge gary's changes Created 9 years, 6 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/host_plugin.cc ('k') | remoting/host/host_plugin_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/host_plugin_utils.h
diff --git a/remoting/host/host_plugin_utils.h b/remoting/host/host_plugin_utils.h
new file mode 100644
index 0000000000000000000000000000000000000000..69ac302c890022e887719353ed5064cee48f0da7
--- /dev/null
+++ b/remoting/host/host_plugin_utils.h
@@ -0,0 +1,35 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef REMOTING_HOST_HOST_PLUGIN_UTILS_H_
+#define REMOTING_HOST_HOST_PLUGIN_UTILS_H_
+
+#include <string>
+
+#include "third_party/npapi/bindings/npapi.h"
+#include "third_party/npapi/bindings/npfunctions.h"
+#include "third_party/npapi/bindings/npruntime.h"
+
+namespace remoting {
+
+// Global netscape functions initialized in NP_Initialize.
+extern NPNetscapeFuncs* g_npnetscape_funcs;
+
+// Convert an NPIdentifier into a std::string.
+std::string StringFromNPIdentifier(NPIdentifier identifier);
+
+// Convert an NPVariant into a std::string.
+std::string StringFromNPVariant(const NPVariant& variant);
+
+// Convert a std::string into an NPVariant.
+// Caller is responsible for making sure that NPN_ReleaseVariantValue is
+// called on returned value.
+NPVariant NPVariantFromString(const std::string& val);
+
+// Convert an NPVariant into an NSPObject.
+NPObject* ObjectFromNPVariant(const NPVariant& variant);
+
+} // namespace remoting
+
+#endif // REMOTING_HOST_HOST_PLUGIN_UTILS_H_
« no previous file with comments | « remoting/host/host_plugin.cc ('k') | remoting/host/host_plugin_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698