summaryrefslogtreecommitdiffstats
path: root/o3d
diff options
context:
space:
mode:
authorpiman@google.com <piman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-13 19:35:54 +0000
committerpiman@google.com <piman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-13 19:35:54 +0000
commit3e581acde183d511352e60ad69e8dd07ba20a2f4 (patch)
tree1d79c4a36227f32229350cb39cd12d9b624f11bb /o3d
parentd9c6e97e8bbe28ba6877a825352ea5ea21a137a7 (diff)
downloadchromium_src-3e581acde183d511352e60ad69e8dd07ba20a2f4.zip
chromium_src-3e581acde183d511352e60ad69e8dd07ba20a2f4.tar.gz
chromium_src-3e581acde183d511352e60ad69e8dd07ba20a2f4.tar.bz2
Fixing linux regressions from http://codereview.chromium.org/149130
Review URL: http://codereview.chromium.org/155434 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20512 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d')
-rw-r--r--o3d/plugin/cross/main.cc17
-rw-r--r--o3d/plugin/linux/config.cc4
-rw-r--r--o3d/plugin/linux/main_linux.cc22
3 files changed, 28 insertions, 15 deletions
diff --git a/o3d/plugin/cross/main.cc b/o3d/plugin/cross/main.cc
index 23265e6..d6144ca 100644
--- a/o3d/plugin/cross/main.cc
+++ b/o3d/plugin/cross/main.cc
@@ -46,10 +46,6 @@ ExceptionManager *g_exception_manager = NULL;
namespace o3d {
-char *NP_GetMIMEDescription(void) {
- return O3D_PLUGIN_MIME_TYPE "::O3D MIME";
-}
-
NPError NP_GetValue(void *instance, NPPVariable variable, void *value) {
switch (variable) {
case NPPVpluginNameString:
@@ -172,4 +168,17 @@ NPError OSCALL NP_GetEntryPoints(NPPluginFuncs *pluginFuncs) {
return NPERR_NO_ERROR;
}
+
+char *NP_GetMIMEDescription(void) {
+ return O3D_PLUGIN_MIME_TYPE "::O3D MIME";
+}
+
} // namespace o3d / extern "C"
+
+#if !defined(O3D_INTERNAL_PLUGIN)
+extern "C" {
+NPError NP_GetValue(void *instance, NPPVariable variable, void *value) {
+ return o3d::NP_GetValue(instance, variable, value);
+}
+}
+#endif
diff --git a/o3d/plugin/linux/config.cc b/o3d/plugin/linux/config.cc
index ce1dca5..c45c24f 100644
--- a/o3d/plugin/linux/config.cc
+++ b/o3d/plugin/linux/config.cc
@@ -41,6 +41,8 @@
#include <iostream>
#include <fstream>
+namespace o3d {
+
// Checks OS version
bool CheckOSVersion(NPP npp) {
return true;
@@ -60,3 +62,5 @@ bool GetUserConfigMetrics() {
// TODO: Finish this function!
return true;
}
+
+} // namespace o3d
diff --git a/o3d/plugin/linux/main_linux.cc b/o3d/plugin/linux/main_linux.cc
index a0f1095..b897bb7 100644
--- a/o3d/plugin/linux/main_linux.cc
+++ b/o3d/plugin/linux/main_linux.cc
@@ -570,17 +570,6 @@ static gboolean GtkTimeoutCallback(gpointer user_data) {
return TRUE;
}
-NPError PlatformNPPGetValue(NPP instance, NPPVariable variable, void *value) {
- switch (variable) {
- case NPPVpluginNeedsXEmbed:
- *static_cast<NPBool *>(value) = g_xembed_support;
- return NPERR_NO_ERROR;
- default:
- return NPERR_INVALID_PARAM;
- }
- return NPERR_NO_ERROR;
-}
-
NPError InitializePlugin() {
if (!o3d::SetupOutOfMemoryHandler())
return NPERR_MODULE_LOAD_FAILED_ERROR;
@@ -647,6 +636,17 @@ NPError OSCALL NP_Shutdown(void) {
namespace o3d {
+NPError PlatformNPPGetValue(NPP instance, NPPVariable variable, void *value) {
+ switch (variable) {
+ case NPPVpluginNeedsXEmbed:
+ *static_cast<NPBool *>(value) = g_xembed_support;
+ return NPERR_NO_ERROR;
+ default:
+ return NPERR_INVALID_PARAM;
+ }
+ return NPERR_NO_ERROR;
+}
+
void RenderOnDemandCallbackHandler::Run() {
DrawPlugin(obj_);
}