summaryrefslogtreecommitdiffstats
path: root/remoting/host
diff options
context:
space:
mode:
authorwez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-07 22:56:11 +0000
committerwez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-07 22:56:11 +0000
commit370be0703313e2fa08d95f7e2a1e7050df2efd24 (patch)
treef17e85e4985cdd11ca83dfbcfd379d5230421932 /remoting/host
parent6308200c0c46e198301347ecbe43d703aef7bea6 (diff)
downloadchromium_src-370be0703313e2fa08d95f7e2a1e7050df2efd24.zip
chromium_src-370be0703313e2fa08d95f7e2a1e7050df2efd24.tar.gz
chromium_src-370be0703313e2fa08d95f7e2a1e7050df2efd24.tar.bz2
Add version info with MIME type to Remoting Host plugin for Windows.
BUG= TEST=Remoting Host plugin successfully loads. Review URL: http://codereview.chromium.org/7088016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88228 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host')
-rw-r--r--remoting/host/host_plugin.cc21
-rw-r--r--remoting/host/host_plugin.def6
-rw-r--r--remoting/host/host_plugin.rc103
-rw-r--r--remoting/host/host_plugin_resource.h14
4 files changed, 136 insertions, 8 deletions
diff --git a/remoting/host/host_plugin.cc b/remoting/host/host_plugin.cc
index 7a05eee..3189634 100644
--- a/remoting/host/host_plugin.cc
+++ b/remoting/host/host_plugin.cc
@@ -33,10 +33,11 @@
#include "third_party/npapi/bindings/npfunctions.h"
#include "third_party/npapi/bindings/npruntime.h"
-#if defined (OS_WIN)
-#define OSCALL __declspec(dllexport)
+// Symbol export is handled with a separate def file on Windows.
+#if defined (__GNUC__) && __GNUC__ >= 4
+#define EXPORT __attribute__((visibility("default")))
#else
-#define OSCALL __attribute__((visibility("default")))
+#define EXPORT
#endif
#if defined(OS_WIN)
@@ -895,7 +896,7 @@ DISABLE_RUNNABLE_METHOD_REFCOUNT(HostNPScriptObject);
extern "C" {
-OSCALL NPError NP_GetEntryPoints(NPPluginFuncs* nppfuncs) {
+EXPORT NPError API_CALL NP_GetEntryPoints(NPPluginFuncs* nppfuncs) {
LOG(INFO) << "NP_GetEntryPoints";
nppfuncs->version = (NP_VERSION_MAJOR << 8) | NP_VERSION_MINOR;
nppfuncs->newp = &CreatePlugin;
@@ -907,7 +908,7 @@ OSCALL NPError NP_GetEntryPoints(NPPluginFuncs* nppfuncs) {
return NPERR_NO_ERROR;
}
-OSCALL NPError NP_Initialize(NPNetscapeFuncs* npnetscape_funcs
+EXPORT NPError API_CALL NP_Initialize(NPNetscapeFuncs* npnetscape_funcs
#if defined(OS_POSIX) && !defined(OS_MACOSX)
, NPPluginFuncs* nppfuncs
#endif
@@ -930,22 +931,26 @@ OSCALL NPError NP_Initialize(NPNetscapeFuncs* npnetscape_funcs
return NPERR_NO_ERROR;
}
-OSCALL NPError NP_Shutdown() {
+EXPORT NPError NP_Shutdown() {
LOG(INFO) << "NP_Shutdown";
delete g_at_exit_manager;
g_at_exit_manager = NULL;
return NPERR_NO_ERROR;
}
-OSCALL const char* NP_GetMIMEDescription(void) {
+#if defined(OS_POSIX) && !defined(OS_MACOSX)
+EXPORT const char* API_CALL NP_GetMIMEDescription(void) {
LOG(INFO) << "NP_GetMIMEDescription";
return STRINGIZE(HOST_PLUGIN_MIME_TYPE) ":"
HOST_PLUGIN_NAME ":"
HOST_PLUGIN_DESCRIPTION;
}
-OSCALL NPError NP_GetValue(void* npp, NPPVariable variable, void* value) {
+EXPORT NPError API_CALL NP_GetValue(void* npp,
+ NPPVariable variable,
+ void* value) {
return GetValue((NPP)npp, variable, value);
}
+#endif
} // extern "C"
diff --git a/remoting/host/host_plugin.def b/remoting/host/host_plugin.def
new file mode 100644
index 0000000..2275abf
--- /dev/null
+++ b/remoting/host/host_plugin.def
@@ -0,0 +1,6 @@
+LIBRARY remoting_host_plugin
+
+EXPORTS
+ NP_GetEntryPoints
+ NP_Initialize
+ NP_Shutdown
diff --git a/remoting/host/host_plugin.rc b/remoting/host/host_plugin.rc
new file mode 100644
index 0000000..7bb7c50
--- /dev/null
+++ b/remoting/host/host_plugin.rc
@@ -0,0 +1,103 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "host_plugin_resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "host_plugin_resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,0,0,1
+ PRODUCTVERSION 1,0,0,1
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "CompanyName", ""
+ VALUE "FileDescription", "Chromoting Host Plugin"
+ VALUE "FileVersion", "1, 0, 0, 1"
+ VALUE "MIMEType", "application/vnd.chromium.remoting-host"
+ VALUE "InternalName", "remoting_host_plugin.dll"
+ VALUE "LegalCopyright", "Copyright (C) 2011 The Chromium Authors. All rights reserved."
+ VALUE "OriginalFilename", "remoting_host_plugin.dll"
+ VALUE "ProductName", "Chromoting"
+ VALUE "ProductVersion", "1, 0, 0, 1"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
+
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/remoting/host/host_plugin_resource.h b/remoting/host/host_plugin_resource.h
new file mode 100644
index 0000000..ede80b4
--- /dev/null
+++ b/remoting/host/host_plugin_resource.h
@@ -0,0 +1,14 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by remoting_host_plugin.rc
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 101
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1001
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif