From 3e581acde183d511352e60ad69e8dd07ba20a2f4 Mon Sep 17 00:00:00 2001 From: "piman@google.com" Date: Mon, 13 Jul 2009 19:35:54 +0000 Subject: 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 --- o3d/plugin/cross/main.cc | 17 +++++++++++++---- o3d/plugin/linux/config.cc | 4 ++++ o3d/plugin/linux/main_linux.cc | 22 +++++++++++----------- 3 files changed, 28 insertions(+), 15 deletions(-) (limited to 'o3d') 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 #include +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(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(value) = g_xembed_support; + return NPERR_NO_ERROR; + default: + return NPERR_INVALID_PARAM; + } + return NPERR_NO_ERROR; +} + void RenderOnDemandCallbackHandler::Run() { DrawPlugin(obj_); } -- cgit v1.1