Bug 638145: Remove NPAPI plugin SDK. Replaced by npapi-sdk project on Google Code. r=bsmedberg
authorJosh Aas <joshmoz@gmail.com>
Wed, 23 Mar 2011 11:44:46 -0700
changeset 63554 67ccac595b48a114aff6fa607f2e419031138b2d
parent 63553 5f420b83c3fc2c56eb5445992570f5483995c3dd
child 63555 a200ce37157085713e2183471ee6fe192195c182
push idunknown
push userunknown
push dateunknown
reviewersbsmedberg
bugs638145
milestone2.2a1pre
Bug 638145: Remove NPAPI plugin SDK. Replaced by npapi-sdk project on Google Code. r=bsmedberg
modules/plugin/Makefile.in
modules/plugin/sdk/Makefile.in
modules/plugin/sdk/readme.txt
modules/plugin/sdk/samples/Makefile.in
modules/plugin/sdk/samples/basic/mac/BasicPlugin.c
modules/plugin/sdk/samples/basic/mac/BasicPlugin.h
modules/plugin/sdk/samples/basic/mac/BasicPlugin.xcodeproj/project.pbxproj
modules/plugin/sdk/samples/basic/mac/BasicPlugin_Prefix.pch
modules/plugin/sdk/samples/basic/mac/COPYING
modules/plugin/sdk/samples/basic/mac/English.lproj/InfoPlist.strings
modules/plugin/sdk/samples/basic/mac/Info.plist
modules/plugin/sdk/samples/basic/readme.txt
modules/plugin/sdk/samples/basic/test.html
modules/plugin/sdk/samples/basic/unix/BasicPlugin.c
modules/plugin/sdk/samples/basic/unix/BasicPlugin.h
modules/plugin/sdk/samples/basic/unix/COPYING
modules/plugin/sdk/samples/basic/unix/Makefile
modules/plugin/sdk/samples/basic/windows/Makefile.in
modules/plugin/sdk/samples/basic/windows/basic.def
modules/plugin/sdk/samples/basic/windows/basic.rc
modules/plugin/sdk/samples/basic/windows/npbasic.dsp
modules/plugin/sdk/samples/basic/windows/npbasic.dsw
modules/plugin/sdk/samples/basic/windows/plugin.cpp
modules/plugin/sdk/samples/basic/windows/plugin.h
modules/plugin/sdk/samples/basic/windows/resource.h
modules/plugin/sdk/samples/common/Makefile.in
modules/plugin/sdk/samples/common/np_entry.cpp
modules/plugin/sdk/samples/common/npn_gate.cpp
modules/plugin/sdk/samples/common/npp_gate.cpp
modules/plugin/sdk/samples/include/npplat.h
modules/plugin/sdk/samples/include/pluginbase.h
modules/plugin/sdk/samples/npruntime/Makefile.in
modules/plugin/sdk/samples/npruntime/np_entry.cpp
modules/plugin/sdk/samples/npruntime/npn_gate.cpp
modules/plugin/sdk/samples/npruntime/npp_gate.cpp
modules/plugin/sdk/samples/npruntime/nprt.def
modules/plugin/sdk/samples/npruntime/nprt.rc
modules/plugin/sdk/samples/npruntime/plugin.cpp
modules/plugin/sdk/samples/npruntime/plugin.h
modules/plugin/sdk/samples/npruntime/readme.txt
modules/plugin/sdk/samples/npruntime/resource.h
modules/plugin/sdk/samples/npruntime/test.html
modules/plugin/sdk/samples/npthread/readme.txt
modules/plugin/sdk/samples/npthread/windows/action.cpp
modules/plugin/sdk/samples/npthread/windows/action.h
modules/plugin/sdk/samples/npthread/windows/dbg.cpp
modules/plugin/sdk/samples/npthread/windows/dbg.h
modules/plugin/sdk/samples/npthread/windows/np_entry.cpp
modules/plugin/sdk/samples/npthread/windows/npn_gate.cpp
modules/plugin/sdk/samples/npthread/windows/npp_gate.cpp
modules/plugin/sdk/samples/npthread/windows/npthread.def
modules/plugin/sdk/samples/npthread/windows/npthread.dsp
modules/plugin/sdk/samples/npthread/windows/npthread.dsw
modules/plugin/sdk/samples/npthread/windows/npthread.rc
modules/plugin/sdk/samples/npthread/windows/plugin.cpp
modules/plugin/sdk/samples/npthread/windows/plugin.h
modules/plugin/sdk/samples/npthread/windows/plugload.cpp
modules/plugin/sdk/samples/npthread/windows/plugload.h
modules/plugin/sdk/samples/npthread/windows/resource.h
modules/plugin/sdk/samples/npthread/windows/thread.cpp
modules/plugin/sdk/samples/npthread/windows/thread.h
modules/plugin/sdk/samples/unixprinting/Makefile.in
modules/plugin/sdk/samples/unixprinting/npshell.c
modules/plugin/sdk/samples/unixprinting/npunix.c
modules/plugin/sdk/samples/unixprinting/printplugin.c
modules/plugin/sdk/samples/unixprinting/printplugin.h
modules/plugin/sdk/samples/unixprinting/readme.txt
modules/plugin/sdk/samples/unixprinting/unixprintplugin_test1.html
modules/plugin/sdk/samples/unixprinting/unixprintplugin_test2.html
modules/plugin/sdk/samples/winless/readme.txt
modules/plugin/sdk/samples/winless/test.html
modules/plugin/sdk/samples/winless/windows/Makefile.in
modules/plugin/sdk/samples/winless/windows/npwinless.def
modules/plugin/sdk/samples/winless/windows/npwinless.dsp
modules/plugin/sdk/samples/winless/windows/npwinless.dsw
modules/plugin/sdk/samples/winless/windows/npwinless.rc
modules/plugin/sdk/samples/winless/windows/plugin.cpp
modules/plugin/sdk/samples/winless/windows/plugin.h
modules/plugin/sdk/samples/winless/windows/resource.h
--- a/modules/plugin/Makefile.in
+++ b/modules/plugin/Makefile.in
@@ -50,17 +50,16 @@ ifdef MOZ_PLUGINS
 DIRS		+= base/src 
 
 # These subdirs rely on GTK libraries and header files, it is not
 #  buildable on other non-GTK unix builds
 
 ifdef ENABLE_TESTS
 ifneq (,$(filter WINNT Darwin Linux OS2 SunOS,$(OS_ARCH)))
 DIRS += test
-TOOL_DIRS += sdk
 endif
 endif
 
 endif # MOZ_PLUGINS
 
 include $(topsrcdir)/config/rules.mk
 
 ifdef MOZ_PLUGINS
deleted file mode 100644
--- a/modules/plugin/sdk/Makefile.in
+++ /dev/null
@@ -1,60 +0,0 @@
-#!nmake
-#
-# ***** BEGIN LICENSE BLOCK *****
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-# http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Original Code is mozilla.org code.
-#
-# The Initial Developer of the Original Code is
-# Netscape Communications Corporation.
-# Portions created by the Initial Developer are Copyright (C) 1998
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 2 or later (the "GPL"), or
-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# use your version of this file under the terms of the MPL, indicate your
-# decision by deleting the provisions above and replace them with the notice
-# and other provisions required by the GPL or the LGPL. If you do not delete
-# the provisions above, a recipient may use your version of this file under
-# the terms of any one of the MPL, the GPL or the LGPL.
-#
-# ***** END LICENSE BLOCK *****
-
-DEPTH = ../../..
-topsrcdir = @top_srcdir@
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-DIRS = samples
-
-# uncomment NSDISTMODE to make a copy, instead of symlink, all needed files from $(DIST) 
-# NSDISTMODE = copy
-
-include $(topsrcdir)/config/rules.mk
-
-ifneq (,$(filter WINNT OS2,$(OS_ARCH)))
-PROG_SUFFIX = .exe
-else
-PROG_SUFFIX =
-endif
-
-clobber::
-	$(RM) -r bin idl include
deleted file mode 100644
--- a/modules/plugin/sdk/readme.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-Last updated September 2008
-
-This SDK is based on the API developed originally for Netscape browsers
-starting with Netscape 2.x. It is intended to help in creating plugins
-that will work with any modern NPAPI-compliant web browsers.
-
-===============================================================
-
-Samples
-
-The "samples" directory contains NPAPI plugin samples. Within the "samples"
-directory the common folder contains stub implementations of the NPAPI methods.
-There is no need to modify files in this folder, just include them into your
-project if you wish. Each sample plugin contains a readme file describing it.
-
-===============================================================
-
-Plugin developers might find it useful for debugging purposes to turn
-off the exception catching mechanism currently implemented in Mozilla 
-on Windows. To do this add the following line into your prefs.js file:
-user_pref("plugin.dont_try_safe_calls", true);
deleted file mode 100644
--- a/modules/plugin/sdk/samples/Makefile.in
+++ /dev/null
@@ -1,51 +0,0 @@
-#
-# ***** BEGIN LICENSE BLOCK *****
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-# http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Original Code is mozilla.org code.
-#
-# The Initial Developer of the Original Code is
-# Netscape Communications Corporation.
-# Portions created by the Initial Developer are Copyright (C) 1998
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 2 or later (the "GPL"), or
-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# use your version of this file under the terms of the MPL, indicate your
-# decision by deleting the provisions above and replace them with the notice
-# and other provisions required by the GPL or the LGPL. If you do not delete
-# the provisions above, a recipient may use your version of this file under
-# the terms of any one of the MPL, the GPL or the LGPL.
-#
-# ***** END LICENSE BLOCK *****
-
-DEPTH = ../../../..
-topsrcdir = @top_srcdir@
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-DIRS = common
-
-ifeq ($(OS_ARCH),WINNT)
-DIRS += basic/windows winless/windows
-endif
-
-include $(topsrcdir)/config/rules.mk
deleted file mode 100644
--- a/modules/plugin/sdk/samples/basic/mac/BasicPlugin.c
+++ /dev/null
@@ -1,279 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- *
- * THIS FILE IS PART OF THE MOZILLA NPAPI SDK BASIC PLUGIN SAMPLE
- * SOURCE CODE. USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE
- * IS GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS 
- * SOURCE IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.
- *
- * THE MOZILLA NPAPI SDK BASIC PLUGIN SAMPLE SOURCE CODE IS
- * (C) COPYRIGHT 2008 by the Mozilla Corporation
- * http://www.mozilla.com/
- *
- * Contributors:
- *  Josh Aas <josh@mozilla.com>
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "BasicPlugin.h"
-
-// structure containing pointers to functions implemented by the browser
-static NPNetscapeFuncs* browser;
-
-// local store of the browser UA string that we we paint into the plugin's window
-static CFStringRef browserUAString = NULL;
-
-// data for each instance of this plugin
-typedef struct PluginInstance {
-  NPP npp;
-  NPWindow window;
-} PluginInstance;
-
-void drawPlugin(NPP instance, NPCocoaEvent* event);
-
-// Symbol called once by the browser to initialize the plugin
-NPError NP_Initialize(NPNetscapeFuncs* browserFuncs)
-{  
-  // save away browser functions
-  browser = browserFuncs;
-
-  return NPERR_NO_ERROR;
-}
-
-// Symbol called by the browser to get the plugin's function list
-NPError NP_GetEntryPoints(NPPluginFuncs* pluginFuncs)
-{
-  // Check the size of the provided structure based on the offset of the
-  // last member we need.
-  if (pluginFuncs->size < (offsetof(NPPluginFuncs, setvalue) + sizeof(void*)))
-    return NPERR_INVALID_FUNCTABLE_ERROR;
-
-  pluginFuncs->newp = NPP_New;
-  pluginFuncs->destroy = NPP_Destroy;
-  pluginFuncs->setwindow = NPP_SetWindow;
-  pluginFuncs->newstream = NPP_NewStream;
-  pluginFuncs->destroystream = NPP_DestroyStream;
-  pluginFuncs->asfile = NPP_StreamAsFile;
-  pluginFuncs->writeready = NPP_WriteReady;
-  pluginFuncs->write = (NPP_WriteProcPtr)NPP_Write;
-  pluginFuncs->print = NPP_Print;
-  pluginFuncs->event = NPP_HandleEvent;
-  pluginFuncs->urlnotify = NPP_URLNotify;
-  pluginFuncs->getvalue = NPP_GetValue;
-  pluginFuncs->setvalue = NPP_SetValue;
-
-  return NPERR_NO_ERROR;
-}
-
-// Symbol called once by the browser to shut down the plugin
-void NP_Shutdown(void)
-{
-  CFRelease(browserUAString);
-  browserUAString = NULL;
-}
-
-// Called to create a new instance of the plugin
-NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc, char* argn[], char* argv[], NPSavedData* saved)
-{
-  PluginInstance *newInstance = (PluginInstance*)malloc(sizeof(PluginInstance));
-  bzero(newInstance, sizeof(PluginInstance));
-
-  newInstance->npp = instance;
-  instance->pdata = newInstance;
-
-  // select the right drawing model if necessary
-  NPBool supportsCoreGraphics = false;
-  if (browser->getvalue(instance, NPNVsupportsCoreGraphicsBool, &supportsCoreGraphics) == NPERR_NO_ERROR && supportsCoreGraphics) {
-    browser->setvalue(instance, NPPVpluginDrawingModel, (void*)NPDrawingModelCoreGraphics);
-  } else {
-    printf("CoreGraphics drawing model not supported, can't create a plugin instance.\n");
-    return NPERR_INCOMPATIBLE_VERSION_ERROR;
-  }
-
-  // select the Cocoa event model
-  NPBool supportsCocoaEvents = false;
-  if (browser->getvalue(instance, NPNVsupportsCocoaBool, &supportsCocoaEvents) == NPERR_NO_ERROR && supportsCocoaEvents) {
-    browser->setvalue(instance, NPPVpluginEventModel, (void*)NPEventModelCocoa);
-  } else {
-    printf("Cocoa event model not supported, can't create a plugin instance.\n");
-    return NPERR_INCOMPATIBLE_VERSION_ERROR;
-  }
-
-  if (!browserUAString) {
-    const char* ua = browser->uagent(instance);
-    if (ua)
-      browserUAString = CFStringCreateWithCString(kCFAllocatorDefault, ua, kCFStringEncodingASCII);
-  }
-
-  return NPERR_NO_ERROR;
-}
-
-// Called to destroy an instance of the plugin
-NPError NPP_Destroy(NPP instance, NPSavedData** save)
-{
-  free(instance->pdata);
-
-  return NPERR_NO_ERROR;
-}
-
-// Called to update a plugin instances's NPWindow
-NPError NPP_SetWindow(NPP instance, NPWindow* window)
-{
-  PluginInstance* currentInstance = (PluginInstance*)(instance->pdata);
-
-  currentInstance->window = *window;
-  
-  return NPERR_NO_ERROR;
-}
-
-
-NPError NPP_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16_t* stype)
-{
-  *stype = NP_ASFILEONLY;
-  return NPERR_NO_ERROR;
-}
-
-NPError NPP_DestroyStream(NPP instance, NPStream* stream, NPReason reason)
-{
-  return NPERR_NO_ERROR;
-}
-
-int32_t NPP_WriteReady(NPP instance, NPStream* stream)
-{
-  return 0;
-}
-
-int32_t NPP_Write(NPP instance, NPStream* stream, int32_t offset, int32_t len, void* buffer)
-{
-  return 0;
-}
-
-void NPP_StreamAsFile(NPP instance, NPStream* stream, const char* fname)
-{
-}
-
-void NPP_Print(NPP instance, NPPrint* platformPrint)
-{
-  
-}
-
-int16_t NPP_HandleEvent(NPP instance, void* event)
-{
-  NPCocoaEvent* cocoaEvent = (NPCocoaEvent*)event;
-  if (cocoaEvent && (cocoaEvent->type == NPCocoaEventDrawRect)) {
-    drawPlugin(instance, (NPCocoaEvent*)event);
-    return 1;
-  }
-
-  return 0;
-}
-
-void NPP_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData)
-{
-
-}
-
-NPError NPP_GetValue(NPP instance, NPPVariable variable, void *value)
-{
-  return NPERR_GENERIC_ERROR;
-}
-
-NPError NPP_SetValue(NPP instance, NPNVariable variable, void *value)
-{
-  return NPERR_GENERIC_ERROR;
-}
-
-void drawPlugin(NPP instance, NPCocoaEvent* event)
-{
-  if (!browserUAString)
-    return;
-
-  PluginInstance* currentInstance = (PluginInstance*)(instance->pdata);
-  CGContextRef cgContext = event->data.draw.context;
-  if (!cgContext)
-    return;
-
-  float windowWidth = currentInstance->window.width;
-  float windowHeight = currentInstance->window.height;
-  
-  // save the cgcontext gstate
-  CGContextSaveGState(cgContext);
-  
-  // we get a flipped context
-  CGContextTranslateCTM(cgContext, 0.0, windowHeight);
-  CGContextScaleCTM(cgContext, 1.0, -1.0);
-  
-  // draw a gray background for the plugin
-  CGContextAddRect(cgContext, CGRectMake(0, 0, windowWidth, windowHeight));
-  CGContextSetGrayFillColor(cgContext, 0.5, 1.0);
-  CGContextDrawPath(cgContext, kCGPathFill);
-  
-  // draw a black frame around the plugin
-  CGContextAddRect(cgContext, CGRectMake(0, 0, windowWidth, windowHeight));
-  CGContextSetGrayStrokeColor(cgContext, 0.0, 1.0);
-  CGContextSetLineWidth(cgContext, 6.0);
-  CGContextStrokePath(cgContext);
-  
-  // draw the UA string using ATSUI
-  CGContextSetGrayFillColor(cgContext, 0.0, 1.0);
-  ATSUStyle atsuStyle;
-  ATSUCreateStyle(&atsuStyle);
-  CFIndex stringLength = CFStringGetLength(browserUAString);
-  UniChar* unicharBuffer = (UniChar*)malloc((stringLength + 1) * sizeof(UniChar));
-  CFStringGetCharacters(browserUAString, CFRangeMake(0, stringLength), unicharBuffer);
-  UniCharCount runLengths = kATSUToTextEnd;
-  ATSUTextLayout atsuLayout;
-  ATSUCreateTextLayoutWithTextPtr(unicharBuffer,
-                                  kATSUFromTextBeginning,
-                                  kATSUToTextEnd,
-                                  stringLength,
-                                  1,
-                                  &runLengths,
-                                  &atsuStyle,
-                                  &atsuLayout);
-  ATSUAttributeTag contextTag = kATSUCGContextTag;
-  ByteCount byteSize = sizeof(CGContextRef);
-  ATSUAttributeValuePtr contextATSUPtr = &cgContext;
-  ATSUSetLayoutControls(atsuLayout, 1, &contextTag, &byteSize, &contextATSUPtr);
-  ATSUTextMeasurement lineAscent, lineDescent;
-  ATSUGetLineControl(atsuLayout,
-                    kATSUFromTextBeginning,
-                    kATSULineAscentTag,
-                    sizeof(ATSUTextMeasurement),
-                    &lineAscent,
-                    &byteSize);
-  ATSUGetLineControl(atsuLayout,
-                    kATSUFromTextBeginning,
-                    kATSULineDescentTag,
-                    sizeof(ATSUTextMeasurement),
-                    &lineDescent,
-                    &byteSize);
-  float lineHeight = FixedToFloat(lineAscent) + FixedToFloat(lineDescent);  
-  ItemCount softBreakCount;
-  ATSUBatchBreakLines(atsuLayout,
-                      kATSUFromTextBeginning,
-                      stringLength,
-                      FloatToFixed(windowWidth - 10.0),
-                      &softBreakCount);
-  ATSUGetSoftLineBreaks(atsuLayout,
-                        kATSUFromTextBeginning,
-                        kATSUToTextEnd,
-                        0, NULL, &softBreakCount);
-  UniCharArrayOffset* softBreaks = (UniCharArrayOffset*)malloc(softBreakCount * sizeof(UniCharArrayOffset));
-  ATSUGetSoftLineBreaks(atsuLayout,
-                        kATSUFromTextBeginning,
-                        kATSUToTextEnd,
-                        softBreakCount, softBreaks, &softBreakCount);
-  UniCharArrayOffset currentDrawOffset = kATSUFromTextBeginning;
-  int i = 0;
-  while (i < softBreakCount) {
-    ATSUDrawText(atsuLayout, currentDrawOffset, softBreaks[i], FloatToFixed(5.0), FloatToFixed(windowHeight - 5.0 - (lineHeight * (i + 1.0))));
-    currentDrawOffset = softBreaks[i];
-    i++;
-  }
-  ATSUDrawText(atsuLayout, currentDrawOffset, kATSUToTextEnd, FloatToFixed(5.0), FloatToFixed(windowHeight - 5.0 - (lineHeight * (i + 1.0))));
-  free(unicharBuffer);
-  free(softBreaks);
-  
-  // restore the cgcontext gstate
-  CGContextRestoreGState(cgContext);
-}
deleted file mode 100644
--- a/modules/plugin/sdk/samples/basic/mac/BasicPlugin.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- *
- * THIS FILE IS PART OF THE MOZILLA NPAPI SDK BASIC PLUGIN SAMPLE
- * SOURCE CODE. USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE
- * IS GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS 
- * SOURCE IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.
- *
- * THE MOZILLA NPAPI SDK BASIC PLUGIN SAMPLE SOURCE CODE IS
- * (C) COPYRIGHT 2008 by the Mozilla Corporation
- * http://www.mozilla.com/
- *
- * Contributors:
- *  Josh Aas <josh@mozilla.com>
- *
- * ***** END LICENSE BLOCK ***** */
-
-// This just needs to include NPAPI headers, change the path to whatever works
-// for you. Note that "XP_MACOSX=1" is defined in the project so that the NPAPI
-// headers know we're compiling for Mac OS X.
-#include "../../../../base/public/npapi.h"
-#include "../../../../base/public/npfunctions.h"
-
-NPError NP_Initialize(NPNetscapeFuncs *browserFuncs);
-NPError NP_GetEntryPoints(NPPluginFuncs *pluginFuncs);
-void    NP_Shutdown(void);
-
-NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc, char* argn[], char* argv[], NPSavedData* saved);
-NPError NPP_Destroy(NPP instance, NPSavedData** save);
-NPError NPP_SetWindow(NPP instance, NPWindow* window);
-NPError NPP_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16_t* stype);
-NPError NPP_DestroyStream(NPP instance, NPStream* stream, NPReason reason);
-int32_t NPP_WriteReady(NPP instance, NPStream* stream);
-int32_t NPP_Write(NPP instance, NPStream* stream, int32_t offset, int32_t len, void* buffer);
-void    NPP_StreamAsFile(NPP instance, NPStream* stream, const char* fname);
-void    NPP_Print(NPP instance, NPPrint* platformPrint);
-int16_t NPP_HandleEvent(NPP instance, void* event);
-void    NPP_URLNotify(NPP instance, const char* URL, NPReason reason, void* notifyData);
-NPError NPP_GetValue(NPP instance, NPPVariable variable, void *value);
-NPError NPP_SetValue(NPP instance, NPNVariable variable, void *value);
deleted file mode 100644
--- a/modules/plugin/sdk/samples/basic/mac/BasicPlugin.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,238 +0,0 @@
-// !$*UTF8*$!
-{
-	archiveVersion = 1;
-	classes = {
-	};
-	objectVersion = 45;
-	objects = {
-
-/* Begin PBXBuildFile section */
-		8D01CCCA0486CAD60068D4B7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; };
-		8D01CCCC0486CAD60068D4B7 /* BasicPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 08FB77B2FE8417CDC02AAC07 /* BasicPlugin.c */; settings = {ATTRIBUTES = (); }; };
-		8D01CCCE0486CAD60068D4B7 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08EA7FFBFE8413EDC02AAC07 /* Carbon.framework */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXFileReference section */
-		03A2C0C10E70759100328455 /* BasicPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BasicPlugin.h; sourceTree = "<group>"; };
-		089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
-		08EA7FFBFE8413EDC02AAC07 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
-		08FB77B2FE8417CDC02AAC07 /* BasicPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = BasicPlugin.c; sourceTree = "<group>"; };
-		32BAE0B30371A71500C91783 /* BasicPlugin_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BasicPlugin_Prefix.pch; sourceTree = "<group>"; };
-		8D01CCD10486CAD60068D4B7 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
-		8D01CCD20486CAD60068D4B7 /* BasicPlugin.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BasicPlugin.bundle; sourceTree = BUILT_PRODUCTS_DIR; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
-		8D01CCCD0486CAD60068D4B7 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				8D01CCCE0486CAD60068D4B7 /* Carbon.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
-		089C166AFE841209C02AAC07 /* BasicPlugin */ = {
-			isa = PBXGroup;
-			children = (
-				08FB77ADFE841716C02AAC07 /* Source */,
-				089C167CFE841241C02AAC07 /* Resources */,
-				089C1671FE841209C02AAC07 /* External Frameworks and Libraries */,
-				19C28FB4FE9D528D11CA2CBB /* Products */,
-			);
-			name = BasicPlugin;
-			sourceTree = "<group>";
-		};
-		089C1671FE841209C02AAC07 /* External Frameworks and Libraries */ = {
-			isa = PBXGroup;
-			children = (
-				08EA7FFBFE8413EDC02AAC07 /* Carbon.framework */,
-			);
-			name = "External Frameworks and Libraries";
-			sourceTree = "<group>";
-		};
-		089C167CFE841241C02AAC07 /* Resources */ = {
-			isa = PBXGroup;
-			children = (
-				8D01CCD10486CAD60068D4B7 /* Info.plist */,
-				089C167DFE841241C02AAC07 /* InfoPlist.strings */,
-			);
-			name = Resources;
-			sourceTree = "<group>";
-		};
-		08FB77ADFE841716C02AAC07 /* Source */ = {
-			isa = PBXGroup;
-			children = (
-				32BAE0B30371A71500C91783 /* BasicPlugin_Prefix.pch */,
-				03A2C0C10E70759100328455 /* BasicPlugin.h */,
-				08FB77B2FE8417CDC02AAC07 /* BasicPlugin.c */,
-			);
-			name = Source;
-			sourceTree = "<group>";
-		};
-		19C28FB4FE9D528D11CA2CBB /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				8D01CCD20486CAD60068D4B7 /* BasicPlugin.bundle */,
-			);
-			name = Products;
-			sourceTree = "<group>";
-		};
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
-		8D01CCC60486CAD60068D4B7 /* BasicPlugin */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 4FADC23308B4156C00ABE55E /* Build configuration list for PBXNativeTarget "BasicPlugin" */;
-			buildPhases = (
-				8D01CCC90486CAD60068D4B7 /* Resources */,
-				8D01CCCB0486CAD60068D4B7 /* Sources */,
-				8D01CCCD0486CAD60068D4B7 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = BasicPlugin;
-			productInstallPath = "$(HOME)/Library/Bundles";
-			productName = BasicPlugin;
-			productReference = 8D01CCD20486CAD60068D4B7 /* BasicPlugin.bundle */;
-			productType = "com.apple.product-type.bundle";
-		};
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
-		089C1669FE841209C02AAC07 /* Project object */ = {
-			isa = PBXProject;
-			buildConfigurationList = 4FADC23708B4156C00ABE55E /* Build configuration list for PBXProject "BasicPlugin" */;
-			compatibilityVersion = "Xcode 3.1";
-			hasScannedForEncodings = 1;
-			mainGroup = 089C166AFE841209C02AAC07 /* BasicPlugin */;
-			projectDirPath = "";
-			projectRoot = "";
-			targets = (
-				8D01CCC60486CAD60068D4B7 /* BasicPlugin */,
-			);
-		};
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
-		8D01CCC90486CAD60068D4B7 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				8D01CCCA0486CAD60068D4B7 /* InfoPlist.strings in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
-		8D01CCCB0486CAD60068D4B7 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				8D01CCCC0486CAD60068D4B7 /* BasicPlugin.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXVariantGroup section */
-		089C167DFE841241C02AAC07 /* InfoPlist.strings */ = {
-			isa = PBXVariantGroup;
-			children = (
-				089C167EFE841241C02AAC07 /* English */,
-			);
-			name = InfoPlist.strings;
-			sourceTree = "<group>";
-		};
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
-		4FADC23408B4156C00ABE55E /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COPY_PHASE_STRIP = NO;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_ENABLE_FIX_AND_CONTINUE = YES;
-				GCC_MODEL_TUNING = G5;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = BasicPlugin_Prefix.pch;
-				INFOPLIST_FILE = Info.plist;
-				INSTALL_PATH = "$(HOME)/Library/Bundles";
-				PRODUCT_NAME = BasicPlugin;
-				WRAPPER_EXTENSION = bundle;
-				ZERO_LINK = YES;
-			};
-			name = Debug;
-		};
-		4FADC23508B4156C00ABE55E /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
-				GCC_MODEL_TUNING = G5;
-				GCC_PRECOMPILE_PREFIX_HEADER = YES;
-				GCC_PREFIX_HEADER = BasicPlugin_Prefix.pch;
-				INFOPLIST_FILE = Info.plist;
-				INSTALL_PATH = "$(HOME)/Library/Bundles";
-				PRODUCT_NAME = BasicPlugin;
-				WRAPPER_EXTENSION = bundle;
-			};
-			name = Release;
-		};
-		4FADC23808B4156C00ABE55E /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
-				GCC_C_LANGUAGE_STANDARD = c99;
-				GCC_PREPROCESSOR_DEFINITIONS = "XP_MACOSX=1";
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				ONLY_ACTIVE_ARCH = YES;
-				PREBINDING = NO;
-				SDKROOT = macosx10.5;
-			};
-			name = Debug;
-		};
-		4FADC23908B4156C00ABE55E /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
-				GCC_C_LANGUAGE_STANDARD = c99;
-				GCC_PREPROCESSOR_DEFINITIONS = "XP_MACOSX=1";
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				PREBINDING = NO;
-				SDKROOT = macosx10.5;
-			};
-			name = Release;
-		};
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
-		4FADC23308B4156C00ABE55E /* Build configuration list for PBXNativeTarget "BasicPlugin" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				4FADC23408B4156C00ABE55E /* Debug */,
-				4FADC23508B4156C00ABE55E /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		4FADC23708B4156C00ABE55E /* Build configuration list for PBXProject "BasicPlugin" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				4FADC23808B4156C00ABE55E /* Debug */,
-				4FADC23908B4156C00ABE55E /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-/* End XCConfigurationList section */
-	};
-	rootObject = 089C1669FE841209C02AAC07 /* Project object */;
-}
deleted file mode 100644
--- a/modules/plugin/sdk/samples/basic/mac/BasicPlugin_Prefix.pch
+++ /dev/null
@@ -1,5 +0,0 @@
-//
-// Prefix header for all source files of the 'BasicPlugin' target in the 'BasicPlugin' project.
-//
-
-#include <Carbon/Carbon.h>
deleted file mode 100644
--- a/modules/plugin/sdk/samples/basic/mac/COPYING
+++ /dev/null
@@ -1,28 +0,0 @@
-Copyright (c) 2008 Mozilla Corporation
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-- Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-- Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-- Neither the name of the Mozilla Corporation nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
deleted file mode 100644
index 74d3187406a26213f9d2bcbfa9662776e5535127..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/modules/plugin/sdk/samples/basic/mac/Info.plist
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>CFBundlePackageType</key>
-	<string>BRPL</string>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>en-US</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundleVersion</key>
-	<string>1.0</string>
-	<key>CFBundleIdentifier</key>
-	<string>org.mozilla.basicPlugin</string>
-	<key>CFBundleName</key>
-	<string>${PRODUCT_NAME}</string>
-	<key>CFBundleExecutable</key>
-	<string>${EXECUTABLE_NAME}</string>
-	<key>WebPluginMIMETypes</key>
-	<dict>
-		<key>application/basic-plugin</key>
-		<dict>
-			<key>WebPluginTypeDescription</key>
-			<string>Basic plugin sample</string>
-		</dict>
-	</dict>
-	<key>WebPluginDescription</key>
-	<string>Basic plugin sample, part of the Gecko NPAPI SDK</string>
-	<key>WebPluginName</key>
-	<string>Basic Plugin Sample</string>
-</dict>
-</plist>
deleted file mode 100644
--- a/modules/plugin/sdk/samples/basic/readme.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-Basic Plugin
-
-You should see the plugin window with a black frame around it and the browser user agent string drawn inside.
deleted file mode 100644
--- a/modules/plugin/sdk/samples/basic/test.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<html>
-<body>
-
-<center><h1>Basic Plugin Example for Mozilla Test Case</h1></center>
-
-This test case is to demonstrate the Basic Plugin example. You should see the 
-plugin window with the black frame around it and the browser user agent string 
-which plugin draws inside the window.
-<br><br>
-
-<center>
-<embed type="application/basic-plugin" width=600 height=80>
-</center>
-
-</html>
-</body>
-
deleted file mode 100644
--- a/modules/plugin/sdk/samples/basic/unix/BasicPlugin.c
+++ /dev/null
@@ -1,265 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Josh Aas <josh@mozilla.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "BasicPlugin.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-
-#include <gdk/gdk.h>
-#include <gdk/gdkx.h>
-#include <gtk/gtk.h>
-
-#define PLUGIN_NAME        "Basic Sample Plug-in"
-#define PLUGIN_DESCRIPTION PLUGIN_NAME " (Mozilla SDK)"
-#define PLUGIN_VERSION     "1.0.0.0"
-
-static NPNetscapeFuncs* sBrowserFuncs = NULL;
-
-typedef struct InstanceData {
-  NPP npp;
-  NPWindow window;
-} InstanceData;
-
-static void
-drawWindow(InstanceData* instanceData, GdkDrawable* gdkWindow)
-{
-  NPWindow window = instanceData->window;
-  int x = window.x;
-  int y = window.y;
-  int width = window.width;
-  int height = window.height;
-
-  NPP npp = instanceData->npp;
-  if (!npp)
-    return;
-
-  const char* uaString = sBrowserFuncs->uagent(npp);
-  if (!uaString)
-    return;
-
-  GdkGC* gdkContext = gdk_gc_new(gdkWindow);
-
-  // draw a grey background for the plugin frame
-  GdkColor grey;
-  grey.red = grey.blue = grey.green = 32767;
-  gdk_gc_set_rgb_fg_color(gdkContext, &grey);
-  gdk_draw_rectangle(gdkWindow, gdkContext, TRUE, x, y, width, height);
-
-  // draw a 3-pixel-thick black frame around the plugin
-  GdkColor black;
-  black.red = black.green = black.blue = 0;
-  gdk_gc_set_rgb_fg_color(gdkContext, &black);
-  gdk_gc_set_line_attributes(gdkContext, 3, GDK_LINE_SOLID, GDK_CAP_NOT_LAST, GDK_JOIN_MITER);
-  gdk_draw_rectangle(gdkWindow, gdkContext, FALSE, x + 1, y + 1,
-                     width - 3, height - 3);
-
-  // paint the UA string
-  PangoContext* pangoContext = gdk_pango_context_get();
-  PangoLayout* pangoTextLayout = pango_layout_new(pangoContext);
-  pango_layout_set_width(pangoTextLayout, (width - 10) * PANGO_SCALE);
-  pango_layout_set_text(pangoTextLayout, uaString, -1);
-  gdk_draw_layout(gdkWindow, gdkContext, x + 5, y + 5, pangoTextLayout);
-  g_object_unref(pangoTextLayout);
-
-  g_object_unref(gdkContext);
-}
-
-NP_EXPORT(NPError)
-NP_Initialize(NPNetscapeFuncs* bFuncs, NPPluginFuncs* pFuncs)
-{
-  sBrowserFuncs = bFuncs;
-
-  // Check the size of the provided structure based on the offset of the
-  // last member we need.
-  if (pFuncs->size < (offsetof(NPPluginFuncs, setvalue) + sizeof(void*)))
-    return NPERR_INVALID_FUNCTABLE_ERROR;
-
-  pFuncs->newp = NPP_New;
-  pFuncs->destroy = NPP_Destroy;
-  pFuncs->setwindow = NPP_SetWindow;
-  pFuncs->newstream = NPP_NewStream;
-  pFuncs->destroystream = NPP_DestroyStream;
-  pFuncs->asfile = NPP_StreamAsFile;
-  pFuncs->writeready = NPP_WriteReady;
-  pFuncs->write = NPP_Write;
-  pFuncs->print = NPP_Print;
-  pFuncs->event = NPP_HandleEvent;
-  pFuncs->urlnotify = NPP_URLNotify;
-  pFuncs->getvalue = NPP_GetValue;
-  pFuncs->setvalue = NPP_SetValue;
-
-  return NPERR_NO_ERROR;
-}
-
-NP_EXPORT(char*)
-NP_GetPluginVersion()
-{
-  return PLUGIN_VERSION;
-}
-
-NP_EXPORT(char*)
-NP_GetMIMEDescription()
-{
-  return "application/basic-plugin:bsc:Basic plugin";
-}
-
-NP_EXPORT(NPError)
-NP_GetValue(void* future, NPPVariable aVariable, void* aValue) {
-  switch (aVariable) {
-    case NPPVpluginNameString:
-      *((char**)aValue) = PLUGIN_NAME;
-      break;
-    case NPPVpluginDescriptionString:
-      *((char**)aValue) = PLUGIN_DESCRIPTION;
-      break;
-    default:
-      return NPERR_INVALID_PARAM;
-      break;
-  }
-  return NPERR_NO_ERROR;
-}
-
-NP_EXPORT(NPError)
-NP_Shutdown()
-{
-  return NPERR_NO_ERROR;
-}
-
-NPError
-NPP_New(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc, char* argn[], char* argv[], NPSavedData* saved) {
-  // Make sure we can render this plugin
-  NPBool browserSupportsWindowless = false;
-  sBrowserFuncs->getvalue(instance, NPNVSupportsWindowless, &browserSupportsWindowless);
-  if (!browserSupportsWindowless) {
-    printf("Windowless mode not supported by the browser\n");
-    return NPERR_GENERIC_ERROR;
-  }
-
-  sBrowserFuncs->setvalue(instance, NPPVpluginWindowBool, (void*)false);
-
-  // set up our our instance data
-  InstanceData* instanceData = (InstanceData*)malloc(sizeof(InstanceData));
-  if (!instanceData)
-    return NPERR_OUT_OF_MEMORY_ERROR;
-  memset(instanceData, 0, sizeof(InstanceData));
-  instanceData->npp = instance;
-  instance->pdata = instanceData;
-
-  return NPERR_NO_ERROR;
-}
-
-NPError
-NPP_Destroy(NPP instance, NPSavedData** save) {
-  InstanceData* instanceData = (InstanceData*)(instance->pdata);
-  free(instanceData);
-  return NPERR_NO_ERROR;
-}
-
-NPError
-NPP_SetWindow(NPP instance, NPWindow* window) {
-  InstanceData* instanceData = (InstanceData*)(instance->pdata);
-  instanceData->window = *window;
-  return NPERR_NO_ERROR;
-}
-
-NPError
-NPP_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16_t* stype) {
-  return NPERR_GENERIC_ERROR;
-}
-
-NPError
-NPP_DestroyStream(NPP instance, NPStream* stream, NPReason reason) {
-  return NPERR_GENERIC_ERROR;
-}
-
-int32_t
-NPP_WriteReady(NPP instance, NPStream* stream) {
-  return 0;
-}
-
-int32_t
-NPP_Write(NPP instance, NPStream* stream, int32_t offset, int32_t len, void* buffer) {
-  return 0;
-}
-
-void
-NPP_StreamAsFile(NPP instance, NPStream* stream, const char* fname) {
-
-}
-
-void
-NPP_Print(NPP instance, NPPrint* platformPrint) {
-
-}
-
-int16_t
-NPP_HandleEvent(NPP instance, void* event) {
-  InstanceData *instanceData = (InstanceData*)(instance->pdata);
-  XEvent *nativeEvent = (XEvent*)event;
-
-  if (nativeEvent->type != GraphicsExpose)
-    return 0;
-
-  XGraphicsExposeEvent *expose = &nativeEvent->xgraphicsexpose;
-  instanceData->window.window = (void*)(expose->drawable);
-
-  GdkNativeWindow nativeWinId = (XID)(instanceData->window.window);
-  GdkDrawable* gdkWindow = GDK_DRAWABLE(gdk_window_foreign_new(nativeWinId));  
-  drawWindow(instanceData, gdkWindow);
-  g_object_unref(gdkWindow);
-
-  return 1;
-}
-
-void
-NPP_URLNotify(NPP instance, const char* URL, NPReason reason, void* notifyData) {
-
-}
-
-NPError
-NPP_GetValue(NPP instance, NPPVariable variable, void *value) {
-  return NPERR_GENERIC_ERROR;
-}
-
-NPError
-NPP_SetValue(NPP instance, NPNVariable variable, void *value) {
-  return NPERR_GENERIC_ERROR;
-}
-
deleted file mode 100644
--- a/modules/plugin/sdk/samples/basic/unix/BasicPlugin.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Josh Aas <josh@mozilla.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef BasicPlugin_h_
-#define BasicPlugin_h_
-
-// This just needs to include NPAPI headers, change the path to whatever works
-// for you. Note that "XP_UNIX=1" is defined in the makefile so that the NPAPI
-// headers know we're compiling for unix.
-#include "../../../../base/public/npapi.h"
-#include "../../../../base/public/npfunctions.h"
-
-NPError NP_Initialize(NPNetscapeFuncs* bFuncs, NPPluginFuncs* pFuncs);
-NPError NP_Shutdown();
-
-NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc, char* argn[], char* argv[], NPSavedData* saved);
-NPError NPP_Destroy(NPP instance, NPSavedData** save);
-NPError NPP_SetWindow(NPP instance, NPWindow* window);
-NPError NPP_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16_t* stype);
-NPError NPP_DestroyStream(NPP instance, NPStream* stream, NPReason reason);
-int32_t NPP_WriteReady(NPP instance, NPStream* stream);
-int32_t NPP_Write(NPP instance, NPStream* stream, int32_t offset, int32_t len, void* buffer);
-void    NPP_StreamAsFile(NPP instance, NPStream* stream, const char* fname);
-void    NPP_Print(NPP instance, NPPrint* platformPrint);
-int16_t NPP_HandleEvent(NPP instance, void* event);
-void    NPP_URLNotify(NPP instance, const char* URL, NPReason reason, void* notifyData);
-NPError NPP_GetValue(NPP instance, NPPVariable variable, void *value);
-NPError NPP_SetValue(NPP instance, NPNVariable variable, void *value);
-
-#endif // BasicPlugin_h_
deleted file mode 100644
--- a/modules/plugin/sdk/samples/basic/unix/COPYING
+++ /dev/null
@@ -1,28 +0,0 @@
-Copyright (c) 2009 Mozilla Corporation
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-- Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-- Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-- Neither the name of the Mozilla Corporation nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
deleted file mode 100644
--- a/modules/plugin/sdk/samples/basic/unix/Makefile
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-# ***** BEGIN LICENSE BLOCK *****
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-# http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Original Code is mozilla.org code.
-#
-# The Initial Developer of the Original Code is
-# Netscape Communications Corporation.
-# Portions created by the Initial Developer are Copyright (C) 1998
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-#  Josh Aas <josh@mozilla.com>
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 2 or later (the "GPL"), or
-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# use your version of this file under the terms of the MPL, indicate your
-# decision by deleting the provisions above and replace them with the notice
-# and other provisions required by the GPL or the LGPL. If you do not delete
-# the provisions above, a recipient may use your version of this file under
-# the terms of any one of the MPL, the GPL or the LGPL.
-#
-# ***** END LICENSE BLOCK *****
-
-# Basic plugin requires GTK and X11
-CFLAGS = -Wall -DXP_UNIX=1 -DMOZ_X11=1 -fPIC -g
-
-npbasicplugin : BasicPlugin.o
-	cc $(CFLAGS) -shared BasicPlugin.o -o npbasicplugin.so
-
-BasicPlugin.o : BasicPlugin.c BasicPlugin.h
-	cc `pkg-config --cflags gtk+-2.0` $(CFLAGS) -c BasicPlugin.c
-
-clean :
-	rm npbasicplugin.so BasicPlugin.o
-
deleted file mode 100644
--- a/modules/plugin/sdk/samples/basic/windows/Makefile.in
+++ /dev/null
@@ -1,68 +0,0 @@
-#
-# ***** BEGIN LICENSE BLOCK *****
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-# http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Original Code is mozilla.org code.
-#
-# The Initial Developer of the Original Code is
-# Netscape Communications Corporation.
-# Portions created by the Initial Developer are Copyright (C) 1998
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 2 or later (the "GPL"), or
-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# use your version of this file under the terms of the MPL, indicate your
-# decision by deleting the provisions above and replace them with the notice
-# and other provisions required by the GPL or the LGPL. If you do not delete
-# the provisions above, a recipient may use your version of this file under
-# the terms of any one of the MPL, the GPL or the LGPL.
-#
-# ***** END LICENSE BLOCK *****
-
-DEPTH = ../../../../../..
-topsrcdir = @top_srcdir@
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-XPIDL_MODULE = npbasic
-LIBRARY_NAME = npbasic
-
-NO_DIST_INSTALL = 1
-
-
-CPPSRCS = plugin.cpp
-
-SHARED_LIBRARY_LIBS = ../../common/$(LIB_PREFIX)plugingate_s.$(LIB_SUFFIX)
-
-DEFFILE = $(win_srcdir)/basic.def
-RESFILE = basic.res
-
-ifdef GNU_CC
-OS_LIBS	+= -lgdi32
-endif
-
-include $(topsrcdir)/config/rules.mk
-
-DEFINES += -DMOZILLA_STRICT_API
-
-LOCAL_INCLUDES = -I$(srcdir)/../../include \
-                 -I$(srcdir)/../../../include \
-                 $(NULL)
deleted file mode 100644
--- a/modules/plugin/sdk/samples/basic/windows/basic.def
+++ /dev/null
@@ -1,6 +0,0 @@
-LIBRARY   NPBASIC
-
-EXPORTS
-	NP_GetEntryPoints   @1
-	NP_Initialize       @2
-	NP_Shutdown         @3
deleted file mode 100644
--- a/modules/plugin/sdk/samples/basic/windows/basic.rc
+++ /dev/null
@@ -1,112 +0,0 @@
-//Microsoft Developer Studio generated resource script.
-//
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include "winresrc.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
-
-#ifndef _MAC
-/////////////////////////////////////////////////////////////////////////////
-//
-// Version
-//
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,0,0,1
- PRODUCTVERSION 1,0,0,1
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x40004L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
-    BLOCK "StringFileInfo"
-    BEGIN
-        BLOCK "040904e4"
-        BEGIN
-            VALUE "Comments", "\0"
-            VALUE "CompanyName", " \0"
-            VALUE "FileDescription", "npbasic\0"
-            VALUE "FileExtents", "bic\0"
-            VALUE "FileOpenName", "npbasic\0"
-            VALUE "FileVersion", "1, 0, 0, 1\0"
-            VALUE "InternalName", "npbasic\0"
-            VALUE "LegalCopyright", "Copyright  2001\0"
-            VALUE "LegalTrademarks", "\0"
-            VALUE "MIMEType", "application/basic-plugin\0"
-            VALUE "OriginalFilename", "npbasic.dll\0"
-            VALUE "PrivateBuild", "\0"
-            VALUE "ProductName", "Basic Example Plugin for Mozilla\0"
-            VALUE "ProductVersion", "1, 0, 0, 1\0"
-            VALUE "SpecialBuild", "\0"
-        END
-    END
-    BLOCK "VarFileInfo"
-    BEGIN
-        VALUE "Translation", 0x409, 1252
-    END
-END
-
-#endif    // !_MAC
-
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE DISCARDABLE 
-BEGIN
-    "resource.h\0"
-END
-
-2 TEXTINCLUDE DISCARDABLE 
-BEGIN
-    "#include ""winresrc.h""\r\n"
-    "\0"
-END
-
-3 TEXTINCLUDE DISCARDABLE 
-BEGIN
-    "\r\n"
-    "\0"
-END
-
-#endif    // APSTUDIO_INVOKED
-
-#endif    // English (U.S.) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif    // not APSTUDIO_INVOKED
-
deleted file mode 100644
--- a/modules/plugin/sdk/samples/basic/windows/npbasic.dsp
+++ /dev/null
@@ -1,131 +0,0 @@
-# Microsoft Developer Studio Project File - Name="npbasic" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=npbasic - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "npbasic.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "npbasic.mak" CFG="npbasic - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "npbasic - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "npbasic - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "npbasic - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NPBASIC_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\include" /I "..\..\..\include" /D "NDEBUG" /D "MOZILLA_STRICT_API" /D "XP_WIN" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NPBASIC_EXPORTS" /YX /FD /c
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib /nologo /dll /machine:I386
-
-!ELSEIF  "$(CFG)" == "npbasic - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NPBASIC_EXPORTS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\include" /I "..\..\..\include" /D "_DEBUG" /D "MOZILLA_STRICT_API" /D "XP_WIN" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NPBASIC_EXPORTS" /YX /FD /GZ /c
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-
-!ENDIF 
-
-# Begin Target
-
-# Name "npbasic - Win32 Release"
-# Name "npbasic - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\basic.def
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\common\np_entry.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\common\npn_gate.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\common\npp_gate.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\plugin.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\plugin.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# Begin Source File
-
-SOURCE=.\basic.rc
-# End Source File
-# End Group
-# End Target
-# End Project
deleted file mode 100644
--- a/modules/plugin/sdk/samples/basic/windows/npbasic.dsw
+++ /dev/null
@@ -1,29 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "npbasic"=.\npbasic.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
deleted file mode 100644
--- a/modules/plugin/sdk/samples/basic/windows/plugin.cpp
+++ /dev/null
@@ -1,164 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-
-#include <windows.h>
-#include <windowsx.h>
-
-#include "plugin.h"
-
-//////////////////////////////////////
-//
-// general initialization and shutdown
-//
-NPError NS_PluginInitialize()
-{
-  return NPERR_NO_ERROR;
-}
-
-void NS_PluginShutdown()
-{
-}
-
-/////////////////////////////////////////////////////////////
-//
-// construction and destruction of our plugin instance object
-//
-nsPluginInstanceBase * NS_NewPluginInstance(nsPluginCreateData * aCreateDataStruct)
-{
-  if(!aCreateDataStruct)
-    return NULL;
-
-  nsPluginInstance * plugin = new nsPluginInstance(aCreateDataStruct->instance);
-  return plugin;
-}
-
-void NS_DestroyPluginInstance(nsPluginInstanceBase * aPlugin)
-{
-  if(aPlugin)
-    delete (nsPluginInstance *)aPlugin;
-}
-
-////////////////////////////////////////
-//
-// nsPluginInstance class implementation
-//
-nsPluginInstance::nsPluginInstance(NPP aInstance) : nsPluginInstanceBase(),
-  mInstance(aInstance),
-  mInitialized(FALSE)
-{
-  mhWnd = NULL;
-}
-
-nsPluginInstance::~nsPluginInstance()
-{
-}
-
-static LRESULT CALLBACK PluginWinProc(HWND, UINT, WPARAM, LPARAM);
-static WNDPROC lpOldProc = NULL;
-
-NPBool nsPluginInstance::init(NPWindow* aWindow)
-{
-  if(aWindow == NULL)
-    return FALSE;
-
-  mhWnd = (HWND)aWindow->window;
-  if(mhWnd == NULL)
-    return FALSE;
-
-  // subclass window so we can intercept window messages and
-  // do our drawing to it
-  lpOldProc = SubclassWindow(mhWnd, (WNDPROC)PluginWinProc);
-
-  // associate window with our nsPluginInstance object so we can access 
-  // it in the window procedure
-  SetWindowLongPtr(mhWnd, GWLP_USERDATA, (LONG_PTR)this);
-
-  mInitialized = TRUE;
-  return TRUE;
-}
-
-void nsPluginInstance::shut()
-{
-  // subclass it back
-  SubclassWindow(mhWnd, lpOldProc);
-  mhWnd = NULL;
-  mInitialized = FALSE;
-}
-
-NPBool nsPluginInstance::isInitialized()
-{
-  return mInitialized;
-}
-
-const char * nsPluginInstance::getVersion()
-{
-  return NPN_UserAgent(mInstance);
-}
-
-static LRESULT CALLBACK PluginWinProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
-{
-  switch (msg) {
-    case WM_PAINT:
-      {
-        // draw a frame and display the string
-        PAINTSTRUCT ps;
-        HDC hdc = BeginPaint(hWnd, &ps);
-        RECT rc;
-        GetClientRect(hWnd, &rc);
-        FrameRect(hdc, &rc, GetStockBrush(BLACK_BRUSH));
-
-        // get our plugin instance object and ask it for the version string
-        nsPluginInstance *plugin = (nsPluginInstance *)GetWindowLongPtr(hWnd, GWLP_USERDATA);
-        if (plugin) {
-          const char * string = plugin->getVersion();
-          DrawText(hdc, string, strlen(string), &rc, DT_SINGLELINE | DT_CENTER | DT_VCENTER);
-        }
-        else {
-          char string[] = "Error occurred";
-          DrawText(hdc, string, strlen(string), &rc, DT_SINGLELINE | DT_CENTER | DT_VCENTER);
-        }
-
-        EndPaint(hWnd, &ps);
-      }
-      break;
-    default:
-      break;
-  }
-
-  return DefWindowProc(hWnd, msg, wParam, lParam);
-}
deleted file mode 100644
--- a/modules/plugin/sdk/samples/basic/windows/plugin.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef __PLUGIN_H__
-#define __PLUGIN_H__
-
-#include "pluginbase.h"
-
-class nsPluginInstance : public nsPluginInstanceBase
-{
-public:
-  nsPluginInstance(NPP aInstance);
-  ~nsPluginInstance();
-
-  NPBool init(NPWindow* aWindow);
-  void shut();
-  NPBool isInitialized();
-
-  // locals
-  const char * getVersion();
-
-private:
-  NPP mInstance;
-  NPBool mInitialized;
-  HWND mhWnd;
-};
-
-#endif // __PLUGIN_H__
deleted file mode 100644
--- a/modules/plugin/sdk/samples/basic/windows/resource.h
+++ /dev/null
@@ -1,20 +0,0 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Developer Studio generated include file.
-// Used by basic.rc
-//
-#define IDD_MAIN                        101
-#define IDC_BUTTON_GO                   1002
-#define IDC_STATIC_UA                   1003
-#define IDC_BUTTON1                     1005
-#define IDC_BUTTON_DONT                 1005
-
-// Next default values for new objects
-// 
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE        102
-#define _APS_NEXT_COMMAND_VALUE         40001
-#define _APS_NEXT_CONTROL_VALUE         1006
-#define _APS_NEXT_SYMED_VALUE           101
-#endif
-#endif
deleted file mode 100644
--- a/modules/plugin/sdk/samples/common/Makefile.in
+++ /dev/null
@@ -1,59 +0,0 @@
-#
-# ***** BEGIN LICENSE BLOCK *****
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-# http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Original Code is mozilla.org code.
-#
-# The Initial Developer of the Original Code is
-# Netscape Communications Corporation.
-# Portions created by the Initial Developer are Copyright (C) 1998
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 2 or later (the "GPL"), or
-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# use your version of this file under the terms of the MPL, indicate your
-# decision by deleting the provisions above and replace them with the notice
-# and other provisions required by the GPL or the LGPL. If you do not delete
-# the provisions above, a recipient may use your version of this file under
-# the terms of any one of the MPL, the GPL or the LGPL.
-#
-# ***** END LICENSE BLOCK *****
-
-DEPTH		= ../../../../..
-topsrcdir	= @top_srcdir@
-srcdir		= @srcdir@
-VPATH		= @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-LIBRARY_NAME = plugingate_s
-
-NO_DIST_INSTALL = 1
-
-
-CPPSRCS = npn_gate.cpp \
-          npp_gate.cpp \
-          np_entry.cpp \
-          $(NULL)
-
-FORCE_STATIC_LIB = 1
-
-include $(topsrcdir)/config/rules.mk
-
-LOCAL_INCLUDES	= -I$(srcdir)/../include -I$(srcdir)/../../include
deleted file mode 100644
--- a/modules/plugin/sdk/samples/common/np_entry.cpp
+++ /dev/null
@@ -1,193 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-// Main plugin entry point implementation - exports from the plugin library
-
-#include "npplat.h"
-#include "pluginbase.h"
-
-NPNetscapeFuncs NPNFuncs;
-
-NPError OSCALL NP_Shutdown()
-{
-  NS_PluginShutdown();
-  return NPERR_NO_ERROR;
-}
-
-static NPError fillPluginFunctionTable(NPPluginFuncs* aNPPFuncs)
-{
-  if (!aNPPFuncs)
-    return NPERR_INVALID_FUNCTABLE_ERROR;
-
-  // Set up the plugin function table that Netscape will use to call us.
-  aNPPFuncs->version       = (NP_VERSION_MAJOR << 8) | NP_VERSION_MINOR;
-  aNPPFuncs->newp          = NPP_New;
-  aNPPFuncs->destroy       = NPP_Destroy;
-  aNPPFuncs->setwindow     = NPP_SetWindow;
-  aNPPFuncs->newstream     = NPP_NewStream;
-  aNPPFuncs->destroystream = NPP_DestroyStream;
-  aNPPFuncs->asfile        = NPP_StreamAsFile;
-  aNPPFuncs->writeready    = NPP_WriteReady;
-  aNPPFuncs->write         = NPP_Write;
-  aNPPFuncs->print         = NPP_Print;
-  aNPPFuncs->event         = NPP_HandleEvent;
-  aNPPFuncs->urlnotify     = NPP_URLNotify;
-  aNPPFuncs->getvalue      = NPP_GetValue;
-  aNPPFuncs->setvalue      = NPP_SetValue;
-
-  return NPERR_NO_ERROR;
-}
-
-static NPError fillNetscapeFunctionTable(NPNetscapeFuncs* aNPNFuncs)
-{
-  if (!aNPNFuncs)
-    return NPERR_INVALID_FUNCTABLE_ERROR;
-
-  if (HIBYTE(aNPNFuncs->version) > NP_VERSION_MAJOR)
-    return NPERR_INCOMPATIBLE_VERSION_ERROR;
-
-  if (aNPNFuncs->size < sizeof(NPNetscapeFuncs))
-    return NPERR_INVALID_FUNCTABLE_ERROR;
-
-  NPNFuncs.size             = aNPNFuncs->size;
-  NPNFuncs.version          = aNPNFuncs->version;
-  NPNFuncs.geturlnotify     = aNPNFuncs->geturlnotify;
-  NPNFuncs.geturl           = aNPNFuncs->geturl;
-  NPNFuncs.posturlnotify    = aNPNFuncs->posturlnotify;
-  NPNFuncs.posturl          = aNPNFuncs->posturl;
-  NPNFuncs.requestread      = aNPNFuncs->requestread;
-  NPNFuncs.newstream        = aNPNFuncs->newstream;
-  NPNFuncs.write            = aNPNFuncs->write;
-  NPNFuncs.destroystream    = aNPNFuncs->destroystream;
-  NPNFuncs.status           = aNPNFuncs->status;
-  NPNFuncs.uagent           = aNPNFuncs->uagent;
-  NPNFuncs.memalloc         = aNPNFuncs->memalloc;
-  NPNFuncs.memfree          = aNPNFuncs->memfree;
-  NPNFuncs.memflush         = aNPNFuncs->memflush;
-  NPNFuncs.reloadplugins    = aNPNFuncs->reloadplugins;
-  NPNFuncs.getvalue         = aNPNFuncs->getvalue;
-  NPNFuncs.setvalue         = aNPNFuncs->setvalue;
-  NPNFuncs.invalidaterect   = aNPNFuncs->invalidaterect;
-  NPNFuncs.invalidateregion = aNPNFuncs->invalidateregion;
-  NPNFuncs.forceredraw      = aNPNFuncs->forceredraw;
-
-  return NPERR_NO_ERROR;
-}
-
-//
-// Some exports are different on different platforms
-//
-
-#ifdef XP_WIN
-NPError OSCALL NP_Initialize(NPNetscapeFuncs* aNPNFuncs)
-{
-  NPError rv = fillNetscapeFunctionTable(aNPNFuncs);
-  if (rv != NPERR_NO_ERROR)
-    return rv;
-
-  return NS_PluginInitialize();
-}
-
-NPError OSCALL NP_GetEntryPoints(NPPluginFuncs* aNPPFuncs)
-{
-  return fillPluginFunctionTable(aNPPFuncs);
-}
-#endif // XP_WIN
-
-#ifdef XP_UNIX
-NPError NP_Initialize(NPNetscapeFuncs* aNPNFuncs, NPPluginFuncs* aNPPFuncs)
-{
-  NPError rv = fillNetscapeFunctionTable(aNPNFuncs);
-  if (rv != NPERR_NO_ERROR)
-    return rv;
-
-  rv = fillPluginFunctionTable(aNPPFuncs);
-  if (rv != NPERR_NO_ERROR)
-    return rv;
-
-  return NS_PluginInitialize();
-}
-
-char * NP_GetMIMEDescription(void)
-{
-  return NPP_GetMIMEDescription();
-}
-
-NPError NP_GetValue(void *future, NPPVariable aVariable, void *aValue)
-{
-  return NS_PluginGetValue(aVariable, aValue);
-}
-#endif // XP_UNIX
-
-#ifdef XP_MAC
-short gResFile; // Refnum of the plugin's resource file
-
-NPError Private_Initialize(void)
-{
-  NPError rv = NS_PluginInitialize();
-  return rv;
-}
-
-void Private_Shutdown(void)
-{
-  NS_PluginShutdown();
-  __destroy_global_chain();
-}
-
-NPError main(NPNetscapeFuncs* aNPNFuncs, NPPluginFuncs* aNPPFuncs, NPP_ShutdownUPP* aUnloadUpp)
-{
-  NPError rv = NPERR_NO_ERROR;
-
-  if (!aUnloadUpp)
-    rv = NPERR_INVALID_FUNCTABLE_ERROR;
-
-  if (rv == NPERR_NO_ERROR)
-    rv = fillNetscapeFunctionTable(aNPNFuncs);
-
-  if (rv == NPERR_NO_ERROR) {
-    // defer static constructors until the global functions are initialized.
-    __InitCode__();
-    rv = fillPluginFunctionTable(aNPPFuncs);
-  }
-
-  *aUnloadUpp = NewNPP_ShutdownProc(Private_Shutdown);
-  gResFile = CurResFile();
-  rv = Private_Initialize();
-
-  return rv;
-}
-#endif // XP_MAC
deleted file mode 100644
--- a/modules/plugin/sdk/samples/common/npn_gate.cpp
+++ /dev/null
@@ -1,186 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-// Implementation of Netscape entry points (NPN_*)
-
-#include "npplat.h"
-
-extern NPNetscapeFuncs NPNFuncs;
-
-void NPN_Version(int* plugin_major, int* plugin_minor, int* netscape_major, int* netscape_minor)
-{
-  *plugin_major   = NP_VERSION_MAJOR;
-  *plugin_minor   = NP_VERSION_MINOR;
-  *netscape_major = HIBYTE(NPNFuncs.version);
-  *netscape_minor = LOBYTE(NPNFuncs.version);
-}
-
-NPError NPN_GetURLNotify(NPP instance, const char *url, const char *target, void* notifyData)
-{
-	int navMinorVers = NPNFuncs.version & 0xFF;
-  NPError rv = NPERR_NO_ERROR;
-
-  if (navMinorVers >= NPVERS_HAS_NOTIFICATION)
-		rv = (*NPNFuncs.geturlnotify)(instance, url, target, notifyData);
-	else
-		rv = NPERR_INCOMPATIBLE_VERSION_ERROR;
-
-  return rv;
-}
-
-NPError NPN_GetURL(NPP instance, const char *url, const char *target)
-{
-  return (*NPNFuncs.geturl)(instance, url, target);
-}
-
-NPError NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file, void* notifyData)
-{
-	int navMinorVers = NPNFuncs.version & 0xFF;
-  NPError rv = NPERR_NO_ERROR;
-
-	if (navMinorVers >= NPVERS_HAS_NOTIFICATION)
-		rv = (*NPNFuncs.posturlnotify)(instance, url, window, len, buf, file, notifyData);
-	else
-		rv = NPERR_INCOMPATIBLE_VERSION_ERROR;
-
-  return rv;
-}
-
-NPError NPN_PostURL(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file)
-{
-  return (*NPNFuncs.posturl)(instance, url, window, len, buf, file);
-} 
-
-NPError NPN_RequestRead(NPStream* stream, NPByteRange* rangeList)
-{
-  return (*NPNFuncs.requestread)(stream, rangeList);
-}
-
-NPError NPN_NewStream(NPP instance, NPMIMEType type, const char* target, NPStream** stream)
-{
-	int navMinorVersion = NPNFuncs.version & 0xFF;
-
-  NPError rv = NPERR_NO_ERROR;
-
-	if (navMinorVersion >= NPVERS_HAS_STREAMOUTPUT)
-		rv = (*NPNFuncs.newstream)(instance, type, target, stream);
-	else
-		rv = NPERR_INCOMPATIBLE_VERSION_ERROR;
-
-  return rv;
-}
-
-int32_t NPN_Write(NPP instance, NPStream *stream, int32_t len, void *buffer)
-{
-	int navMinorVersion = NPNFuncs.version & 0xFF;
-  int32_t rv = 0;
-
-  if (navMinorVersion >= NPVERS_HAS_STREAMOUTPUT)
-		rv = (*NPNFuncs.write)(instance, stream, len, buffer);
-	else
-		rv = -1;
-
-  return rv;
-}
-
-NPError NPN_DestroyStream(NPP instance, NPStream* stream, NPError reason)
-{
-	int navMinorVersion = NPNFuncs.version & 0xFF;
-  NPError rv = NPERR_NO_ERROR;
-
-  if (navMinorVersion >= NPVERS_HAS_STREAMOUTPUT)
-		rv = (*NPNFuncs.destroystream)(instance, stream, reason);
-	else
-		rv = NPERR_INCOMPATIBLE_VERSION_ERROR;
-
-  return rv;
-}
-
-void NPN_Status(NPP instance, const char *message)
-{
-  (*NPNFuncs.status)(instance, message);
-}
-
-const char* NPN_UserAgent(NPP instance)
-{
-  return (*NPNFuncs.uagent)(instance);
-}
-
-void* NPN_MemAlloc(uint32_t size)
-{
-  return (*NPNFuncs.memalloc)(size);
-}
-
-void NPN_MemFree(void* ptr)
-{
-  (*NPNFuncs.memfree)(ptr);
-}
-
-uint32_t NPN_MemFlush(uint32_t size)
-{
-  return (*NPNFuncs.memflush)(size);
-}
-
-void NPN_ReloadPlugins(NPBool reloadPages)
-{
-  (*NPNFuncs.reloadplugins)(reloadPages);
-}
-
-NPError NPN_GetValue(NPP instance, NPNVariable variable, void *value)
-{
-  return (*NPNFuncs.getvalue)(instance, variable, value);
-}
-
-NPError NPN_SetValue(NPP instance, NPPVariable variable, void *value)
-{
-  return (*NPNFuncs.setvalue)(instance, variable, value);
-}
-
-void NPN_InvalidateRect(NPP instance, NPRect *invalidRect)
-{
-  (*NPNFuncs.invalidaterect)(instance, invalidRect);
-}
-
-void NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion)
-{
-  (*NPNFuncs.invalidateregion)(instance, invalidRegion);
-}
-
-void NPN_ForceRedraw(NPP instance)
-{
-  (*NPNFuncs.forceredraw)(instance);
-}
deleted file mode 100644
--- a/modules/plugin/sdk/samples/common/npp_gate.cpp
+++ /dev/null
@@ -1,242 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-// Implementation of plugin entry points (NPP_*)
-
-#include "pluginbase.h"
-
-// here the plugin creates a plugin instance object which 
-// will be associated with this newly created NPP instance and 
-// will do all the necessary job
-NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc, char* argn[], char* argv[], NPSavedData* saved)
-{   
-  if (!instance)
-    return NPERR_INVALID_INSTANCE_ERROR;
-
-  // create a new plugin instance object
-  // initialization will be done when the associated window is ready
-  nsPluginCreateData ds;
-  
-  ds.instance = instance;
-  ds.type     = pluginType; 
-  ds.mode     = mode; 
-  ds.argc     = argc; 
-  ds.argn     = argn; 
-  ds.argv     = argv; 
-  ds.saved    = saved;
-
-  nsPluginInstanceBase * plugin = NS_NewPluginInstance(&ds);
-  if (!plugin)
-    return NPERR_OUT_OF_MEMORY_ERROR;
-
-  // associate the plugin instance object with NPP instance
-  instance->pdata = (void *)plugin;
-  return NPERR_NO_ERROR;
-}
-
-// here is the place to clean up and destroy the nsPluginInstance object
-NPError NPP_Destroy (NPP instance, NPSavedData** save)
-{
-  if (!instance)
-    return NPERR_INVALID_INSTANCE_ERROR;
-
-  nsPluginInstanceBase * plugin = (nsPluginInstanceBase *)instance->pdata;
-  if (plugin) {
-    plugin->shut();
-    NS_DestroyPluginInstance(plugin);
-  }
-  return NPERR_NO_ERROR;
-}
-
-// during this call we know when the plugin window is ready or
-// is about to be destroyed so we can do some gui specific
-// initialization and shutdown
-NPError NPP_SetWindow (NPP instance, NPWindow* pNPWindow)
-{    
-  if (!instance)
-    return NPERR_INVALID_INSTANCE_ERROR;
-
-  if (!pNPWindow)
-    return NPERR_GENERIC_ERROR;
-
-  nsPluginInstanceBase * plugin = (nsPluginInstanceBase *)instance->pdata;
-
-  if (!plugin) 
-    return NPERR_GENERIC_ERROR;
-
-  // window just created
-  if (!plugin->isInitialized() && pNPWindow->window) { 
-    if (!plugin->init(pNPWindow)) {
-      NS_DestroyPluginInstance(plugin);
-      return NPERR_MODULE_LOAD_FAILED_ERROR;
-    }
-  }
-
-  // window goes away
-  if (!pNPWindow->window && plugin->isInitialized())
-    return plugin->SetWindow(pNPWindow);
-
-  // window resized?
-  if (plugin->isInitialized() && pNPWindow->window)
-    return plugin->SetWindow(pNPWindow);
-
-  // this should not happen, nothing to do
-  if (!pNPWindow->window && !plugin->isInitialized())
-    return plugin->SetWindow(pNPWindow);
-
-  return NPERR_NO_ERROR;
-}
-
-NPError NPP_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16_t* stype)
-{
-  if (!instance)
-    return NPERR_INVALID_INSTANCE_ERROR;
-
-  nsPluginInstanceBase * plugin = (nsPluginInstanceBase *)instance->pdata;
-  if (!plugin) 
-    return NPERR_GENERIC_ERROR;
-
-  return plugin->NewStream(type, stream, seekable, stype);
-}
-
-int32_t NPP_WriteReady (NPP instance, NPStream *stream)
-{
-  if (!instance)
-    return 0x0fffffff;
-
-  nsPluginInstanceBase * plugin = (nsPluginInstanceBase *)instance->pdata;
-  if (!plugin) 
-    return 0x0fffffff;
-
-  return plugin->WriteReady(stream);
-}
-
-int32_t NPP_Write (NPP instance, NPStream *stream, int32_t offset, int32_t len, void *buffer)
-{   
-  if (!instance)
-    return len;
-
-  nsPluginInstanceBase * plugin = (nsPluginInstanceBase *)instance->pdata;
-  if (!plugin) 
-    return len;
-
-  return plugin->Write(stream, offset, len, buffer);
-}
-
-NPError NPP_DestroyStream (NPP instance, NPStream *stream, NPError reason)
-{
-  if (!instance)
-    return NPERR_INVALID_INSTANCE_ERROR;
-
-  nsPluginInstanceBase * plugin = (nsPluginInstanceBase *)instance->pdata;
-  if (!plugin) 
-    return NPERR_GENERIC_ERROR;
-
-  return plugin->DestroyStream(stream, reason);
-}
-
-void NPP_StreamAsFile (NPP instance, NPStream* stream, const char* fname)
-{
-  if (!instance)
-    return;
-
-  nsPluginInstanceBase * plugin = (nsPluginInstanceBase *)instance->pdata;
-  if (!plugin) 
-    return;
-
-  plugin->StreamAsFile(stream, fname);
-}
-
-void NPP_Print (NPP instance, NPPrint* printInfo)
-{
-  if (!instance)
-    return;
-
-  nsPluginInstanceBase * plugin = (nsPluginInstanceBase *)instance->pdata;
-  if (!plugin) 
-    return;
-
-  plugin->Print(printInfo);
-}
-
-void NPP_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData)
-{
-  if (!instance)
-    return;
-
-  nsPluginInstanceBase * plugin = (nsPluginInstanceBase *)instance->pdata;
-  if (!plugin) 
-    return;
-
-  plugin->URLNotify(url, reason, notifyData);
-}
-
-NPError	NPP_GetValue(NPP instance, NPPVariable variable, void *value)
-{
-  if (!instance)
-    return NPERR_INVALID_INSTANCE_ERROR;
-
-  nsPluginInstanceBase * plugin = (nsPluginInstanceBase *)instance->pdata;
-  if (!plugin) 
-    return NPERR_GENERIC_ERROR;
-
-  return plugin->GetValue(variable, value);
-}
-
-NPError NPP_SetValue(NPP instance, NPNVariable variable, void *value)
-{
-  if (!instance)
-    return NPERR_INVALID_INSTANCE_ERROR;
-
-  nsPluginInstanceBase * plugin = (nsPluginInstanceBase *)instance->pdata;
-  if (!plugin) 
-    return NPERR_GENERIC_ERROR;
-
-  return plugin->SetValue(variable, value);
-}
-
-int16_t	NPP_HandleEvent(NPP instance, void* event)
-{
-  if (!instance)
-    return 0;
-
-  nsPluginInstanceBase * plugin = (nsPluginInstanceBase *)instance->pdata;
-  if (!plugin) 
-    return 0;
-
-  return plugin->HandleEvent(event);
-}
deleted file mode 100644
--- a/modules/plugin/sdk/samples/include/npplat.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef npplat_h_
-#define npplat_h_
-
-#include "npapi.h"
-#include "npfunctions.h"
-
-#ifdef XP_WIN
-#include "windows.h"
-#endif
-
-#ifdef XP_UNIX
-#include <stdio.h>
-#endif
-
-#ifdef XP_MAC
-#include <Carbon/Carbon.h>
-#endif
-
-#ifndef HIBYTE
-#define HIBYTE(i) (i >> 8)
-#endif
-
-#ifndef LOBYTE
-#define LOBYTE(i) (i & 0xff)
-#endif
-
-#endif // npplat_h_
deleted file mode 100644
--- a/modules/plugin/sdk/samples/include/pluginbase.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef pluginbase_h_
-#define pluginbase_h_
-
-#include "npplat.h"
-
-struct nsPluginCreateData
-{
-  NPP instance;
-  NPMIMEType type; 
-  uint16_t mode; 
-  int16_t argc; 
-  char** argn; 
-  char** argv; 
-  NPSavedData* saved;
-};
-
-class nsPluginInstanceBase
-{
-public:
-  // these three methods must be implemented in the derived
-  // class platform specific way
-  virtual NPBool init(NPWindow* aWindow) = 0;
-  virtual void shut() = 0;
-  virtual NPBool isInitialized() = 0;
-
-  // implement all or part of those methods in the derived 
-  // class as needed
-  virtual NPError SetWindow(NPWindow* pNPWindow)                    { return NPERR_NO_ERROR; }
-  virtual NPError NewStream(NPMIMEType type, NPStream* stream, 
-                            NPBool seekable, uint16_t* stype)       { return NPERR_NO_ERROR; }
-  virtual NPError DestroyStream(NPStream *stream, NPError reason)   { return NPERR_NO_ERROR; }
-  virtual void    StreamAsFile(NPStream* stream, const char* fname) { return; }
-  virtual int32_t WriteReady(NPStream *stream)                      { return 0x0fffffff; }
-  virtual int32_t Write(NPStream *stream, int32_t offset, 
-                        int32_t len, void *buffer)                  { return len; }
-  virtual void    Print(NPPrint* printInfo)                         { return; }
-  virtual uint16_t HandleEvent(void* event)                         { return 0; }
-  virtual void    URLNotify(const char* url, NPReason reason, 
-                            void* notifyData)                       { return; }
-  virtual NPError GetValue(NPPVariable variable, void *value)       { return NPERR_NO_ERROR; }
-  virtual NPError SetValue(NPNVariable variable, void *value)       { return NPERR_NO_ERROR; }
-};
-
-// functions that should be implemented for each specific plugin
-
-// creation and destruction of the object of the derived class
-nsPluginInstanceBase * NS_NewPluginInstance(nsPluginCreateData * aCreateDataStruct);
-void NS_DestroyPluginInstance(nsPluginInstanceBase * aPlugin);
-
-// global plugin initialization and shutdown
-NPError NS_PluginInitialize();
-void NS_PluginShutdown();
-
-#ifdef XP_UNIX
-// global to get plugins name & description 
-NPError NS_PluginGetValue(NPPVariable aVariable, void *aValue);
-#endif
-
-#endif // pluginbase_h_
deleted file mode 100644
--- a/modules/plugin/sdk/samples/npruntime/Makefile.in
+++ /dev/null
@@ -1,64 +0,0 @@
-############################################################################
-## Makefile.in (Generic SANE Plugin Tree)
-##
-## The contents of this file are subject to the Mozilla Public
-## License Version 1.1 (the "License"); you may not use this file
-## except in compliance with the License. You may obtain a copy of
-## the License at http://www.mozilla.org/MPL/
-##
-## Software distributed under the License is distributed on an "AS
-## IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-## implied. See the License for the specific language governing
-## rights and limitations under the License.
-## Contributor(s): 
-##
-##   Rusty Lynch <rusty.lynch@intel.com>
-############################################################################
-
-DEPTH		= ../../../../..
-topsrcdir	= @top_srcdir@
-srcdir		= @srcdir@
-VPATH		= @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-MODULE		= plugin
-LIBRARY_NAME	= nprt
-ifeq ($(OS_ARCH),WINNT)
-RESFILE		= nprt.res
-DEFFILE		= $(srcdir)/nprt.def
-endif
-
-# plugins should always be shared, even in the "static" build
-FORCE_SHARED_LIB = 1
-
-# Force use of PIC
-FORCE_USE_PIC	= 1
-
-NO_DIST_INSTALL	= 1
-NO_INSTALL = 1
-
-CPPSRCS = \
-	np_entry.cpp		\
-	npn_gate.cpp		\
-	npp_gate.cpp		\
-	plugin.cpp		\
-	$(NULL)
-
-
-LOCAL_INCLUDES  = -I$(srcdir)/.. -I$(srcdir)/../../public \
-		  -I/usr/lib/glib/include 
-
-include $(topsrcdir)/config/rules.mk
-
-install-plugin: $(SHARED_LIBRARY)
-ifdef SHARED_LIBRARY
-	$(INSTALL) $(SHARED_LIBRARY) $(DIST)/bin/plugins
-endif
-
-libs:: install-plugin
-
-install:: $(SHARED_LIBRARY)
-ifdef SHARED_LIBRARY
-	$(SYSINSTALL) $(IFLAGS2) $< $(DESTDIR)$(mozappdir)/plugins
-endif
deleted file mode 100644
--- a/modules/plugin/sdk/samples/npruntime/np_entry.cpp
+++ /dev/null
@@ -1,185 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: NPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Netscape Public License
- * Version 1.1 (the "License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License at
- * http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is 
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or 
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the NPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the NPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-//////////////////////////////////////////////////////////////
-//
-// Main plugin entry point implementation
-//
-#include "npapi.h"
-#include "npfunctions.h"
-
-#ifndef HIBYTE
-#define HIBYTE(x) ((((uint32_t)(x)) & 0xff00) >> 8)
-#endif
-
-NPNetscapeFuncs NPNFuncs;
-
-#ifdef XP_WIN
-
-NPError OSCALL NP_GetEntryPoints(NPPluginFuncs* pFuncs)
-{
-  if(pFuncs == NULL)
-    return NPERR_INVALID_FUNCTABLE_ERROR;
-
-  if(pFuncs->size < (offsetof(NPPluginFuncs, setvalue) + sizeof(void*)))
-    return NPERR_INVALID_FUNCTABLE_ERROR;
-
-  pFuncs->newp          = NPP_New;
-  pFuncs->destroy       = NPP_Destroy;
-  pFuncs->setwindow     = NPP_SetWindow;
-  pFuncs->newstream     = NPP_NewStream;
-  pFuncs->destroystream = NPP_DestroyStream;
-  pFuncs->asfile        = NPP_StreamAsFile;
-  pFuncs->writeready    = NPP_WriteReady;
-  pFuncs->write         = NPP_Write;
-  pFuncs->print         = NPP_Print;
-  pFuncs->event         = NPP_HandleEvent;
-  pFuncs->urlnotify     = NPP_URLNotify;
-  pFuncs->getvalue      = NPP_GetValue;
-  pFuncs->setvalue      = NPP_SetValue;
-
-  return NPERR_NO_ERROR;
-}
-
-#endif /* XP_WIN */
-
-char *NPP_GetMIMEDescription();
-
-char *
-NP_GetMIMEDescription()
-{
-  return NPP_GetMIMEDescription();
-}
-
-NPError
-NP_GetValue(void* future, NPPVariable variable, void *value)
-{
-  return NPP_GetValue((NPP_t *)future, variable, value);
-}
-
-NPError OSCALL
-NP_Initialize(NPNetscapeFuncs* pFuncs
-#ifdef XP_UNIX
-              , NPPluginFuncs* pluginFuncs
-#endif
-              )
-{
-  if(pFuncs == NULL)
-    return NPERR_INVALID_FUNCTABLE_ERROR;
-
-  if(HIBYTE(pFuncs->version) > NP_VERSION_MAJOR)
-    return NPERR_INCOMPATIBLE_VERSION_ERROR;
-
-  if(pFuncs->size < sizeof(NPNetscapeFuncs))
-    return NPERR_INVALID_FUNCTABLE_ERROR;
-
-  NPNFuncs.size                    = pFuncs->size;
-  NPNFuncs.version                 = pFuncs->version;
-  NPNFuncs.geturlnotify            = pFuncs->geturlnotify;
-  NPNFuncs.geturl                  = pFuncs->geturl;
-  NPNFuncs.posturlnotify           = pFuncs->posturlnotify;
-  NPNFuncs.posturl                 = pFuncs->posturl;
-  NPNFuncs.requestread             = pFuncs->requestread;
-  NPNFuncs.newstream               = pFuncs->newstream;
-  NPNFuncs.write                   = pFuncs->write;
-  NPNFuncs.destroystream           = pFuncs->destroystream;
-  NPNFuncs.status                  = pFuncs->status;
-  NPNFuncs.uagent                  = pFuncs->uagent;
-  NPNFuncs.memalloc                = pFuncs->memalloc;
-  NPNFuncs.memfree                 = pFuncs->memfree;
-  NPNFuncs.memflush                = pFuncs->memflush;
-  NPNFuncs.reloadplugins           = pFuncs->reloadplugins;
-  NPNFuncs.getJavaEnv              = NULL;
-  NPNFuncs.getJavaPeer             = NULL;
-  NPNFuncs.getvalue                = pFuncs->getvalue;
-  NPNFuncs.setvalue                = pFuncs->setvalue;
-  NPNFuncs.invalidaterect          = pFuncs->invalidaterect;
-  NPNFuncs.invalidateregion        = pFuncs->invalidateregion;
-  NPNFuncs.forceredraw             = pFuncs->forceredraw;
-  NPNFuncs.getstringidentifier     = pFuncs->getstringidentifier;
-  NPNFuncs.getstringidentifiers    = pFuncs->getstringidentifiers;
-  NPNFuncs.getintidentifier        = pFuncs->getintidentifier;
-  NPNFuncs.identifierisstring      = pFuncs->identifierisstring;
-  NPNFuncs.utf8fromidentifier      = pFuncs->utf8fromidentifier;
-  NPNFuncs.intfromidentifier       = pFuncs->intfromidentifier;
-  NPNFuncs.createobject            = pFuncs->createobject;
-  NPNFuncs.retainobject            = pFuncs->retainobject;
-  NPNFuncs.releaseobject           = pFuncs->releaseobject;
-  NPNFuncs.invoke                  = pFuncs->invoke;
-  NPNFuncs.invokeDefault           = pFuncs->invokeDefault;
-  NPNFuncs.evaluate                = pFuncs->evaluate;
-  NPNFuncs.getproperty             = pFuncs->getproperty;
-  NPNFuncs.setproperty             = pFuncs->setproperty;
-  NPNFuncs.removeproperty          = pFuncs->removeproperty;
-  NPNFuncs.hasproperty             = pFuncs->hasproperty;
-  NPNFuncs.hasmethod               = pFuncs->hasmethod;
-  NPNFuncs.releasevariantvalue     = pFuncs->releasevariantvalue;
-  NPNFuncs.setexception            = pFuncs->setexception;
-
-#ifdef XP_UNIX
-  /*
-   * Set up the plugin function table that Netscape will use to
-   * call us.  Netscape needs to know about our version and size
-   * and have a UniversalProcPointer for every function we
-   * implement.
-   */
-  pluginFuncs->version    = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR;
-  pluginFuncs->size       = sizeof(NPPluginFuncs);
-  pluginFuncs->newp       = (NPP_NewProcPtr)(NPP_New);
-  pluginFuncs->destroy    = (NPP_DestroyProcPtr)(NPP_Destroy);
-  pluginFuncs->setwindow  = (NPP_SetWindowProcPtr)(NPP_SetWindow);
-  pluginFuncs->newstream  = (NPP_NewStreamProcPtr)(NPP_NewStream);
-  pluginFuncs->destroystream = (NPP_DestroyStreamProcPtr)(NPP_DestroyStream);
-  pluginFuncs->asfile     = (NPP_StreamAsFileProcPtr)(NPP_StreamAsFile);
-  pluginFuncs->writeready = (NPP_WriteReadyProcPtr)(NPP_WriteReady);
-  pluginFuncs->write      = (NPP_WriteProcPtr)(NPP_Write);
-  pluginFuncs->print      = (NPP_PrintProcPtr)(NPP_Print);
-  pluginFuncs->urlnotify  = (NPP_URLNotifyProcPtr)(NPP_URLNotify);
-  pluginFuncs->event      = NULL;
-  pluginFuncs->getvalue   = (NPP_GetValueProcPtr)(NPP_GetValue);
-  pluginFuncs->javaClass  = NULL;
-
-  NPP_Initialize();
-#endif
-
-  return NPERR_NO_ERROR;
-}
-
-NPError OSCALL NP_Shutdown()
-{
-  return NPERR_NO_ERROR;
-}
deleted file mode 100644
--- a/modules/plugin/sdk/samples/npruntime/npn_gate.cpp
+++ /dev/null
@@ -1,320 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: NPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Netscape Public License
- * Version 1.1 (the "License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License at
- * http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is 
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or 
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the NPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the NPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-////////////////////////////////////////////////////////////
-//
-// Implementation of Netscape entry points (NPN_*)
-//
-#include "npapi.h"
-#include "npfunctions.h"
-
-#ifndef HIBYTE
-#define HIBYTE(x) ((((uint32_t)(x)) & 0xff00) >> 8)
-#endif
-
-#ifndef LOBYTE
-#define LOBYTE(W) ((W) & 0xFF)
-#endif
-
-extern NPNetscapeFuncs NPNFuncs;
-
-void NPN_Version(int* plugin_major, int* plugin_minor, int* netscape_major, int* netscape_minor)
-{
-  *plugin_major   = NP_VERSION_MAJOR;
-  *plugin_minor   = NP_VERSION_MINOR;
-  *netscape_major = HIBYTE(NPNFuncs.version);
-  *netscape_minor = LOBYTE(NPNFuncs.version);
-}
-
-NPError NPN_GetURLNotify(NPP instance, const char *url, const char *target, void* notifyData)
-{
-	int navMinorVers = NPNFuncs.version & 0xFF;
-  NPError rv = NPERR_NO_ERROR;
-
-  if( navMinorVers >= NPVERS_HAS_NOTIFICATION )
-		rv = NPNFuncs.geturlnotify(instance, url, target, notifyData);
-	else
-		rv = NPERR_INCOMPATIBLE_VERSION_ERROR;
-
-  return rv;
-}
-
-NPError NPN_GetURL(NPP instance, const char *url, const char *target)
-{
-  NPError rv = NPNFuncs.geturl(instance, url, target);
-  return rv;
-}
-
-NPError NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file, void* notifyData)
-{
-	int navMinorVers = NPNFuncs.version & 0xFF;
-  NPError rv = NPERR_NO_ERROR;
-
-	if( navMinorVers >= NPVERS_HAS_NOTIFICATION )
-		rv = NPNFuncs.posturlnotify(instance, url, window, len, buf, file, notifyData);
-	else
-		rv = NPERR_INCOMPATIBLE_VERSION_ERROR;
-
-  return rv;
-}
-
-NPError NPN_PostURL(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file)
-{
-  NPError rv = NPNFuncs.posturl(instance, url, window, len, buf, file);
-  return rv;
-} 
-
-NPError NPN_RequestRead(NPStream* stream, NPByteRange* rangeList)
-{
-  NPError rv = NPNFuncs.requestread(stream, rangeList);
-  return rv;
-}
-
-NPError NPN_NewStream(NPP instance, NPMIMEType type, const char* target, NPStream** stream)
-{
-	int navMinorVersion = NPNFuncs.version & 0xFF;
-
-  NPError rv = NPERR_NO_ERROR;
-
-	if( navMinorVersion >= NPVERS_HAS_STREAMOUTPUT )
-		rv = NPNFuncs.newstream(instance, type, target, stream);
-	else
-		rv = NPERR_INCOMPATIBLE_VERSION_ERROR;
-
-  return rv;
-}
-
-int32_t NPN_Write(NPP instance, NPStream *stream, int32_t len, void *buffer)
-{
-	int navMinorVersion = NPNFuncs.version & 0xFF;
-  int32_t rv = 0;
-
-  if( navMinorVersion >= NPVERS_HAS_STREAMOUTPUT )
-		rv = NPNFuncs.write(instance, stream, len, buffer);
-	else
-		rv = -1;
-
-  return rv;
-}
-
-NPError NPN_DestroyStream(NPP instance, NPStream* stream, NPError reason)
-{
-	int navMinorVersion = NPNFuncs.version & 0xFF;
-  NPError rv = NPERR_NO_ERROR;
-
-  if( navMinorVersion >= NPVERS_HAS_STREAMOUTPUT )
-		rv = NPNFuncs.destroystream(instance, stream, reason);
-	else
-		rv = NPERR_INCOMPATIBLE_VERSION_ERROR;
-
-  return rv;
-}
-
-void NPN_Status(NPP instance, const char *message)
-{
-  NPNFuncs.status(instance, message);
-}
-
-const char* NPN_UserAgent(NPP instance)
-{
-  const char * rv = NULL;
-  rv = NPNFuncs.uagent(instance);
-  return rv;
-}
-
-void* NPN_MemAlloc(uint32_t size)
-{
-  void * rv = NULL;
-  rv = NPNFuncs.memalloc(size);
-  return rv;
-}
-
-void NPN_MemFree(void* ptr)
-{
-  NPNFuncs.memfree(ptr);
-}
-
-uint32_t NPN_MemFlush(uint32_t size)
-{
-  uint32_t rv = NPNFuncs.memflush(size);
-  return rv;
-}
-
-void NPN_ReloadPlugins(NPBool reloadPages)
-{
-  NPNFuncs.reloadplugins(reloadPages);
-}
-
-NPError NPN_GetValue(NPP instance, NPNVariable variable, void *value)
-{
-  NPError rv = NPNFuncs.getvalue(instance, variable, value);
-  return rv;
-}
-
-NPError NPN_SetValue(NPP instance, NPPVariable variable, void *value)
-{
-  NPError rv = NPNFuncs.setvalue(instance, variable, value);
-  return rv;
-}
-
-void NPN_InvalidateRect(NPP instance, NPRect *invalidRect)
-{
-  NPNFuncs.invalidaterect(instance, invalidRect);
-}
-
-void NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion)
-{
-  NPNFuncs.invalidateregion(instance, invalidRegion);
-}
-
-void NPN_ForceRedraw(NPP instance)
-{
-  NPNFuncs.forceredraw(instance);
-}
-
-NPIdentifier NPN_GetStringIdentifier(const NPUTF8 *name)
-{
-  return NPNFuncs.getstringidentifier(name);
-}
-
-void NPN_GetStringIdentifiers(const NPUTF8 **names, uint32_t nameCount,
-                              NPIdentifier *identifiers)
-{
-  return NPNFuncs.getstringidentifiers(names, nameCount, identifiers);
-}
-
-NPIdentifier NPN_GetStringIdentifier(int32_t intid)
-{
-  return NPNFuncs.getintidentifier(intid);
-}
-
-bool NPN_IdentifierIsString(NPIdentifier identifier)
-{
-  return NPNFuncs.identifierisstring(identifier);
-}
-
-NPUTF8 *NPN_UTF8FromIdentifier(NPIdentifier identifier)
-{
-  return NPNFuncs.utf8fromidentifier(identifier);
-}
-
-int32_t NPN_IntFromIdentifier(NPIdentifier identifier)
-{
-  return NPNFuncs.intfromidentifier(identifier);
-}
-
-NPObject *NPN_CreateObject(NPP npp, NPClass *aClass)
-{
-  return NPNFuncs.createobject(npp, aClass);
-}
-
-NPObject *NPN_RetainObject(NPObject *obj)
-{
-  return NPNFuncs.retainobject(obj);
-}
-
-void NPN_ReleaseObject(NPObject *obj)
-{
-  return NPNFuncs.releaseobject(obj);
-}
-
-bool NPN_Invoke(NPP npp, NPObject* obj, NPIdentifier methodName,
-                const NPVariant *args, uint32_t argCount, NPVariant *result)
-{
-  return NPNFuncs.invoke(npp, obj, methodName, args, argCount, result);
-}
-
-bool NPN_InvokeDefault(NPP npp, NPObject* obj, const NPVariant *args,
-                       uint32_t argCount, NPVariant *result)
-{
-  return NPNFuncs.invokeDefault(npp, obj, args, argCount, result);
-}
-
-bool NPN_Evaluate(NPP npp, NPObject* obj, NPString *script,
-                  NPVariant *result)
-{
-  return NPNFuncs.evaluate(npp, obj, script, result);
-}
-
-bool NPN_GetProperty(NPP npp, NPObject* obj, NPIdentifier propertyName,
-                     NPVariant *result)
-{
-  return NPNFuncs.getproperty(npp, obj, propertyName, result);
-}
-
-bool NPN_SetProperty(NPP npp, NPObject* obj, NPIdentifier propertyName,
-                     const NPVariant *value)
-{
-  return NPNFuncs.setproperty(npp, obj, propertyName, value);
-}
-
-bool NPN_RemoveProperty(NPP npp, NPObject* obj, NPIdentifier propertyName)
-{
-  return NPNFuncs.removeproperty(npp, obj, propertyName);
-}
-
-bool NPN_Enumerate(NPP npp, NPObject *obj, NPIdentifier **identifier,
-                   uint32_t *count)
-{
-  return NPNFuncs.enumerate(npp, obj, identifier, count);
-}
-
-bool NPN_Construct(NPP npp, NPObject *obj, const NPVariant *args,
-                   uint32_t argCount, NPVariant *result)
-{
-  return NPNFuncs.construct(npp, obj, args, argCount, result);
-}
-
-bool NPN_HasProperty(NPP npp, NPObject* obj, NPIdentifier propertyName)
-{
-  return NPNFuncs.hasproperty(npp, obj, propertyName);
-}
-
-bool NPN_HasMethod(NPP npp, NPObject* obj, NPIdentifier methodName)
-{
-  return NPNFuncs.hasmethod(npp, obj, methodName);
-}
-
-void NPN_ReleaseVariantValue(NPVariant *variant)
-{
-  NPNFuncs.releasevariantvalue(variant);
-}
-
-void NPN_SetException(NPObject* obj, const NPUTF8 *message)
-{
-  NPNFuncs.setexception(obj, message);
-}
deleted file mode 100644
--- a/modules/plugin/sdk/samples/npruntime/npp_gate.cpp
+++ /dev/null
@@ -1,269 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: NPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Netscape Public License
- * Version 1.1 (the "License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License at
- * http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is 
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or 
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the NPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the NPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-////////////////////////////////////////////////////////////
-//
-// Implementation of plugin entry points (NPP_*)
-// most are just empty stubs for this particular plugin 
-//
-#include "plugin.h"
-
-char*
-NPP_GetMIMEDescription(void)
-{
-  return "application/mozilla-npruntime-scriptable-plugin:.foo:Scriptability Demo Plugin";
-}
-
-
-
-NPError NPP_Initialize(void)
-{
-  return NPERR_NO_ERROR;
-}
-
-void NPP_Shutdown(void)
-{
-}
-
-// here the plugin creates an instance of our CPlugin object which 
-// will be associated with this newly created plugin instance and 
-// will do all the neccessary job
-NPError NPP_New(NPMIMEType pluginType,
-                NPP instance,
-                uint16_t mode,
-                int16_t argc,
-                char* argn[],
-                char* argv[],
-                NPSavedData* saved)
-{   
-  if(instance == NULL)
-    return NPERR_INVALID_INSTANCE_ERROR;
-
-  NPError rv = NPERR_NO_ERROR;
-
-  CPlugin * pPlugin = new CPlugin(instance);
-  if(pPlugin == NULL)
-    return NPERR_OUT_OF_MEMORY_ERROR;
-
-  instance->pdata = (void *)pPlugin;
-  return rv;
-}
-
-// here is the place to clean up and destroy the CPlugin object
-NPError NPP_Destroy (NPP instance, NPSavedData** save)
-{
-  if(instance == NULL)
-    return NPERR_INVALID_INSTANCE_ERROR;
-
-  NPError rv = NPERR_NO_ERROR;
-
-  CPlugin * pPlugin = (CPlugin *)instance->pdata;
-  if(pPlugin != NULL) {
-    pPlugin->shut();
-    delete pPlugin;
-  }
-  return rv;
-}
-
-// during this call we know when the plugin window is ready or
-// is about to be destroyed so we can do some gui specific
-// initialization and shutdown
-NPError NPP_SetWindow (NPP instance, NPWindow* pNPWindow)
-{    
-  if(instance == NULL)
-    return NPERR_INVALID_INSTANCE_ERROR;
-
-  NPError rv = NPERR_NO_ERROR;
-
-  if(pNPWindow == NULL)
-    return NPERR_GENERIC_ERROR;
-
-  CPlugin * pPlugin = (CPlugin *)instance->pdata;
-
-  if(pPlugin == NULL) 
-    return NPERR_GENERIC_ERROR;
-
-  // window just created
-  if(!pPlugin->isInitialized() && (pNPWindow->window != NULL)) { 
-    if(!pPlugin->init(pNPWindow)) {
-      delete pPlugin;
-      pPlugin = NULL;
-      return NPERR_MODULE_LOAD_FAILED_ERROR;
-    }
-  }
-
-  // window goes away
-  if((pNPWindow->window == NULL) && pPlugin->isInitialized())
-    return NPERR_NO_ERROR;
-
-  // window resized
-  if(pPlugin->isInitialized() && (pNPWindow->window != NULL))
-    return NPERR_NO_ERROR;
-
-  // this should not happen, nothing to do
-  if((pNPWindow->window == NULL) && !pPlugin->isInitialized())
-    return NPERR_NO_ERROR;
-
-  return rv;
-}
-
-NPError	NPP_GetValue(NPP instance, NPPVariable variable, void *value)
-{
-  if(instance == NULL)
-    return NPERR_INVALID_INSTANCE_ERROR;
-
-  NPError rv = NPERR_NO_ERROR;
-
-  if(instance == NULL)
-    return NPERR_GENERIC_ERROR;
-
-  CPlugin * plugin = (CPlugin *)instance->pdata;
-  if(plugin == NULL)
-    return NPERR_GENERIC_ERROR;
-
-  switch (variable) {
-  case NPPVpluginNameString:
-    *((char **)value) = "NPRuntimeTest";
-    break;
-  case NPPVpluginDescriptionString:
-    *((char **)value) = "NPRuntime scriptability API test plugin";
-    break;
-
-  // Here we indicate that the plugin is scriptable. See this page for details:
-  // https://developer.mozilla.org/en/Gecko_Plugin_API_Reference/Scripting_plugins
-  case NPPVpluginScriptableNPObject:
-    *(NPObject **)value = plugin->GetScriptableObject();
-    break;
-  default:
-    rv = NPERR_GENERIC_ERROR;
-  }
-
-  return rv;
-}
-
-NPError NPP_NewStream(NPP instance,
-                      NPMIMEType type,
-                      NPStream* stream, 
-                      NPBool seekable,
-                      uint16_t* stype)
-{
-  if(instance == NULL)
-    return NPERR_INVALID_INSTANCE_ERROR;
-
-  NPError rv = NPERR_NO_ERROR;
-  return rv;
-}
-
-int32_t NPP_WriteReady (NPP instance, NPStream *stream)
-{
-  if(instance == NULL)
-    return NPERR_INVALID_INSTANCE_ERROR;
-
-  int32_t rv = 0x0fffffff;
-  return rv;
-}
-
-int32_t NPP_Write (NPP instance, NPStream *stream, int32_t offset, int32_t len, void *buffer)
-{   
-  if(instance == NULL)
-    return NPERR_INVALID_INSTANCE_ERROR;
-
-  int32_t rv = len;
-  return rv;
-}
-
-NPError NPP_DestroyStream (NPP instance, NPStream *stream, NPError reason)
-{
-  if(instance == NULL)
-    return NPERR_INVALID_INSTANCE_ERROR;
-
-  NPError rv = NPERR_NO_ERROR;
-  return rv;
-}
-
-void NPP_StreamAsFile (NPP instance, NPStream* stream, const char* fname)
-{
-  if(instance == NULL)
-    return;
-}
-
-void NPP_Print (NPP instance, NPPrint* printInfo)
-{
-  if(instance == NULL)
-    return;
-}
-
-void NPP_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData)
-{
-  if(instance == NULL)
-    return;
-}
-
-NPError NPP_SetValue(NPP instance, NPNVariable variable, void *value)
-{
-  if(instance == NULL)
-    return NPERR_INVALID_INSTANCE_ERROR;
-
-  NPError rv = NPERR_NO_ERROR;
-  return rv;
-}
-
-int16_t	NPP_HandleEvent(NPP instance, void* event)
-{
-  if(instance == NULL)
-    return 0;
-
-  int16_t rv = 0;
-  CPlugin * pPlugin = (CPlugin *)instance->pdata;
-  if (pPlugin)
-    rv = pPlugin->handleEvent(event);
-
-  return rv;
-}
-
-NPObject *NPP_GetScriptableInstance(NPP instance)
-{
-  if(!instance)
-    return 0;
-
-  NPObject *npobj = 0;
-  CPlugin * pPlugin = (CPlugin *)instance->pdata;
-  if (!pPlugin)
-    npobj = pPlugin->GetScriptableObject();
-
-  return npobj;
-}
deleted file mode 100644
--- a/modules/plugin/sdk/samples/npruntime/nprt.def
+++ /dev/null
@@ -1,6 +0,0 @@
-LIBRARY   NPRT
-
-EXPORTS
-	NP_GetEntryPoints   @1
-	NP_Initialize       @2
-	NP_Shutdown         @3
deleted file mode 100644
--- a/modules/plugin/sdk/samples/npruntime/nprt.rc
+++ /dev/null
@@ -1,112 +0,0 @@
-//Microsoft Developer Studio generated resource script.
-//
-#include "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
-
-#ifndef _MAC
-/////////////////////////////////////////////////////////////////////////////
-//
-// Version
-//
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,0,0,1
- PRODUCTVERSION 1,0,0,1
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x40004L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
-    BLOCK "StringFileInfo"
-    BEGIN
-        BLOCK "040904e4"
-        BEGIN
-            VALUE "Comments", "\0"
-            VALUE "CompanyName", " \0"
-            VALUE "FileDescription", "nprt\0"
-            VALUE "FileExtents", "rts\0"
-            VALUE "FileOpenName", "nprt\0"
-            VALUE "FileVersion", "1, 0, 0, 1\0"
-            VALUE "InternalName", "nprt\0"
-            VALUE "LegalCopyright", "Copyright  1999\0"
-            VALUE "LegalTrademarks", "\0"
-            VALUE "MIMEType", "application/mozilla-npruntime-scriptable-plugin\0"
-            VALUE "OriginalFilename", "nprt.dll\0"
-            VALUE "PrivateBuild", "\0"
-            VALUE "ProductName", "npruntime scriptable example plugin\0"
-            VALUE "ProductVersion", "1, 0, 0, 1\0"
-            VALUE "SpecialBuild", "\0"
-        END
-    END
-    BLOCK "VarFileInfo"
-    BEGIN
-        VALUE "Translation", 0x409, 1252
-    END
-END
-
-#endif    // !_MAC
-
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE DISCARDABLE 
-BEGIN
-    "resource.h\0"
-END
-
-2 TEXTINCLUDE DISCARDABLE 
-BEGIN
-    "#include ""afxres.h""\r\n"
-    "\0"
-END
-
-3 TEXTINCLUDE DISCARDABLE 
-BEGIN
-    "\r\n"
-    "\0"
-END
-
-#endif    // APSTUDIO_INVOKED
-
-#endif    // English (U.S.) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif    // not APSTUDIO_INVOKED
-
deleted file mode 100644
--- a/modules/plugin/sdk/samples/npruntime/plugin.cpp
+++ /dev/null
@@ -1,777 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: NPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Netscape Public License
- * Version 1.1 (the "License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License at
- * http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is 
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or 
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the NPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the NPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-//////////////////////////////////////////////////
-//
-// CPlugin class implementation
-//
-#ifdef XP_WIN
-#include <windows.h>
-#include <windowsx.h>
-#endif
-
-#ifdef XP_MAC
-#include <TextEdit.h>
-#endif
-
-#ifdef XP_UNIX
-#include <string.h>
-#endif
-
-#include "plugin.h"
-#include "npfunctions.h"
-
-static NPIdentifier sFoo_id;
-static NPIdentifier sBar_id;
-static NPIdentifier sDocument_id;
-static NPIdentifier sBody_id;
-static NPIdentifier sCreateElement_id;
-static NPIdentifier sCreateTextNode_id;
-static NPIdentifier sAppendChild_id;
-static NPIdentifier sPluginType_id;
-static NPObject *sWindowObj;
-
-// Helper class that can be used to map calls to the NPObject hooks
-// into virtual methods on instances of classes that derive from this
-// class.
-class ScriptablePluginObjectBase : public NPObject
-{
-public:
-  ScriptablePluginObjectBase(NPP npp)
-    : mNpp(npp)
-  {
-  }
-
-  virtual ~ScriptablePluginObjectBase()
-  {
-  }
-
-  // Virtual NPObject hooks called through this base class. Override
-  // as you see fit.
-  virtual void Invalidate();
-  virtual bool HasMethod(NPIdentifier name);
-  virtual bool Invoke(NPIdentifier name, const NPVariant *args,
-                      uint32_t argCount, NPVariant *result);
-  virtual bool InvokeDefault(const NPVariant *args, uint32_t argCount,
-                             NPVariant *result);
-  virtual bool HasProperty(NPIdentifier name);
-  virtual bool GetProperty(NPIdentifier name, NPVariant *result);
-  virtual bool SetProperty(NPIdentifier name, const NPVariant *value);
-  virtual bool RemoveProperty(NPIdentifier name);
-  virtual bool Enumerate(NPIdentifier **identifier, uint32_t *count);
-  virtual bool Construct(const NPVariant *args, uint32_t argCount,
-                         NPVariant *result);
-
-public:
-  static void _Deallocate(NPObject *npobj);
-  static void _Invalidate(NPObject *npobj);
-  static bool _HasMethod(NPObject *npobj, NPIdentifier name);
-  static bool _Invoke(NPObject *npobj, NPIdentifier name,
-                      const NPVariant *args, uint32_t argCount,
-                      NPVariant *result);
-  static bool _InvokeDefault(NPObject *npobj, const NPVariant *args,
-                             uint32_t argCount, NPVariant *result);
-  static bool _HasProperty(NPObject * npobj, NPIdentifier name);
-  static bool _GetProperty(NPObject *npobj, NPIdentifier name,
-                           NPVariant *result);
-  static bool _SetProperty(NPObject *npobj, NPIdentifier name,
-                           const NPVariant *value);
-  static bool _RemoveProperty(NPObject *npobj, NPIdentifier name);
-  static bool _Enumerate(NPObject *npobj, NPIdentifier **identifier,
-                         uint32_t *count);
-  static bool _Construct(NPObject *npobj, const NPVariant *args,
-                         uint32_t argCount, NPVariant *result);
-
-protected:
-  NPP mNpp;
-};
-
-#define DECLARE_NPOBJECT_CLASS_WITH_BASE(_class, ctor)                        \
-static NPClass s##_class##_NPClass = {                                        \
-  NP_CLASS_STRUCT_VERSION_CTOR,                                               \
-  ctor,                                                                       \
-  ScriptablePluginObjectBase::_Deallocate,                                    \
-  ScriptablePluginObjectBase::_Invalidate,                                    \
-  ScriptablePluginObjectBase::_HasMethod,                                     \
-  ScriptablePluginObjectBase::_Invoke,                                        \
-  ScriptablePluginObjectBase::_InvokeDefault,                                 \
-  ScriptablePluginObjectBase::_HasProperty,                                   \
-  ScriptablePluginObjectBase::_GetProperty,                                   \
-  ScriptablePluginObjectBase::_SetProperty,                                   \
-  ScriptablePluginObjectBase::_RemoveProperty,                                \
-  ScriptablePluginObjectBase::_Enumerate,                                     \
-  ScriptablePluginObjectBase::_Construct                                      \
-}
-
-#define GET_NPOBJECT_CLASS(_class) &s##_class##_NPClass
-
-void
-ScriptablePluginObjectBase::Invalidate()
-{
-}
-
-bool
-ScriptablePluginObjectBase::HasMethod(NPIdentifier name)
-{
-  return false;
-}
-
-bool
-ScriptablePluginObjectBase::Invoke(NPIdentifier name, const NPVariant *args,
-                                   uint32_t argCount, NPVariant *result)
-{
-  return false;
-}
-
-bool
-ScriptablePluginObjectBase::InvokeDefault(const NPVariant *args,
-                                          uint32_t argCount, NPVariant *result)
-{
-  return false;
-}
-
-bool
-ScriptablePluginObjectBase::HasProperty(NPIdentifier name)
-{
-  return false;
-}
-
-bool
-ScriptablePluginObjectBase::GetProperty(NPIdentifier name, NPVariant *result)
-{
-  return false;
-}
-
-bool
-ScriptablePluginObjectBase::SetProperty(NPIdentifier name,
-                                        const NPVariant *value)
-{
-  if (name == sBar_id) {
-    printf ("bar set\n");
-
-    return true;
-  }
-
-  return false;
-}
-
-bool
-ScriptablePluginObjectBase::RemoveProperty(NPIdentifier name)
-{
-  return false;
-}
-
-bool
-ScriptablePluginObjectBase::Enumerate(NPIdentifier **identifier,
-                                      uint32_t *count)
-{
-  return false;
-}
-
-bool
-ScriptablePluginObjectBase::Construct(const NPVariant *args, uint32_t argCount,
-                                      NPVariant *result)
-{
-  return false;
-}
-
-// static
-void
-ScriptablePluginObjectBase::_Deallocate(NPObject *npobj)
-{
-  // Call the virtual destructor.
-  delete (ScriptablePluginObjectBase *)npobj;
-}
-
-// static
-void
-ScriptablePluginObjectBase::_Invalidate(NPObject *npobj)
-{
-  ((ScriptablePluginObjectBase *)npobj)->Invalidate();
-}
-
-// static
-bool
-ScriptablePluginObjectBase::_HasMethod(NPObject *npobj, NPIdentifier name)
-{
-  return ((ScriptablePluginObjectBase *)npobj)->HasMethod(name);
-}
-
-// static
-bool
-ScriptablePluginObjectBase::_Invoke(NPObject *npobj, NPIdentifier name,
-                                    const NPVariant *args, uint32_t argCount,
-                                    NPVariant *result)
-{
-  return ((ScriptablePluginObjectBase *)npobj)->Invoke(name, args, argCount,
-                                                       result);
-}
-
-// static
-bool
-ScriptablePluginObjectBase::_InvokeDefault(NPObject *npobj,
-                                           const NPVariant *args,
-                                           uint32_t argCount,
-                                           NPVariant *result)
-{
-  return ((ScriptablePluginObjectBase *)npobj)->InvokeDefault(args, argCount,
-                                                              result);
-}
-
-// static
-bool
-ScriptablePluginObjectBase::_HasProperty(NPObject * npobj, NPIdentifier name)
-{
-  return ((ScriptablePluginObjectBase *)npobj)->HasProperty(name);
-}
-
-// static
-bool
-ScriptablePluginObjectBase::_GetProperty(NPObject *npobj, NPIdentifier name,
-                                         NPVariant *result)
-{
-  return ((ScriptablePluginObjectBase *)npobj)->GetProperty(name, result);
-}
-
-// static
-bool
-ScriptablePluginObjectBase::_SetProperty(NPObject *npobj, NPIdentifier name,
-                                         const NPVariant *value)
-{
-  return ((ScriptablePluginObjectBase *)npobj)->SetProperty(name, value);
-}
-
-// static
-bool
-ScriptablePluginObjectBase::_RemoveProperty(NPObject *npobj, NPIdentifier name)
-{
-  return ((ScriptablePluginObjectBase *)npobj)->RemoveProperty(name);
-}
-
-// static
-bool
-ScriptablePluginObjectBase::_Enumerate(NPObject *npobj,
-                                       NPIdentifier **identifier,
-                                       uint32_t *count)
-{
-  return ((ScriptablePluginObjectBase *)npobj)->Enumerate(identifier, count);
-}
-
-// static
-bool
-ScriptablePluginObjectBase::_Construct(NPObject *npobj, const NPVariant *args,
-                                       uint32_t argCount, NPVariant *result)
-{
-  return ((ScriptablePluginObjectBase *)npobj)->Construct(args, argCount,
-                                                          result);
-}
-
-
-class ConstructablePluginObject : public ScriptablePluginObjectBase
-{
-public:
-  ConstructablePluginObject(NPP npp)
-    : ScriptablePluginObjectBase(npp)
-  {
-  }
-
-  virtual bool Construct(const NPVariant *args, uint32_t argCount,
-                         NPVariant *result);
-};
-
-static NPObject *
-AllocateConstructablePluginObject(NPP npp, NPClass *aClass)
-{
-  return new ConstructablePluginObject(npp);
-}
-
-DECLARE_NPOBJECT_CLASS_WITH_BASE(ConstructablePluginObject,
-                                 AllocateConstructablePluginObject);
-
-bool
-ConstructablePluginObject::Construct(const NPVariant *args, uint32_t argCount,
-                                     NPVariant *result)
-{
-  printf("Creating new ConstructablePluginObject!\n");
-
-  NPObject *myobj =
-    NPN_CreateObject(mNpp, GET_NPOBJECT_CLASS(ConstructablePluginObject));
-  if (!myobj)
-    return false;
-
-  OBJECT_TO_NPVARIANT(myobj, *result);
-
-  return true;
-}
-
-class ScriptablePluginObject : public ScriptablePluginObjectBase
-{
-public:
-  ScriptablePluginObject(NPP npp)
-    : ScriptablePluginObjectBase(npp)
-  {
-  }
-
-  virtual bool HasMethod(NPIdentifier name);
-  virtual bool HasProperty(NPIdentifier name);
-  virtual bool GetProperty(NPIdentifier name, NPVariant *result);
-  virtual bool Invoke(NPIdentifier name, const NPVariant *args,
-                      uint32_t argCount, NPVariant *result);
-  virtual bool InvokeDefault(const NPVariant *args, uint32_t argCount,
-                             NPVariant *result);
-};
-
-static NPObject *
-AllocateScriptablePluginObject(NPP npp, NPClass *aClass)
-{
-  return new ScriptablePluginObject(npp);
-}
-
-DECLARE_NPOBJECT_CLASS_WITH_BASE(ScriptablePluginObject,
-                                 AllocateScriptablePluginObject);
-
-bool
-ScriptablePluginObject::HasMethod(NPIdentifier name)
-{
-  return name == sFoo_id;
-}
-
-bool
-ScriptablePluginObject::HasProperty(NPIdentifier name)
-{
-  return (name == sBar_id ||
-          name == sPluginType_id);
-}
-
-bool
-ScriptablePluginObject::GetProperty(NPIdentifier name, NPVariant *result)
-{
-  VOID_TO_NPVARIANT(*result);
-
-  if (name == sBar_id) {
-    static int a = 17;
-
-    INT32_TO_NPVARIANT(a, *result);
-
-    a += 5;
-
-    return true;
-  }
-
-  if (name == sPluginType_id) {
-    NPObject *myobj =
-      NPN_CreateObject(mNpp, GET_NPOBJECT_CLASS(ConstructablePluginObject));
-    if (!myobj) {
-      return false;
-    }
-
-    OBJECT_TO_NPVARIANT(myobj, *result);
-
-    return true;
-  }
-
-  return true;
-}
-
-bool
-ScriptablePluginObject::Invoke(NPIdentifier name, const NPVariant *args,
-                               uint32_t argCount, NPVariant *result)
-{
-  if (name == sFoo_id) {
-    printf ("foo called!\n");
-
-    NPVariant docv;
-    NPN_GetProperty(mNpp, sWindowObj, sDocument_id, &docv);
-
-    NPObject *doc = NPVARIANT_TO_OBJECT(docv);
-
-    NPVariant strv;
-    STRINGZ_TO_NPVARIANT("div", strv);
-
-    NPVariant divv;
-    NPN_Invoke(mNpp, doc, sCreateElement_id, &strv, 1, &divv);
-
-    STRINGZ_TO_NPVARIANT("I'm created by a plugin!", strv);
-
-    NPVariant textv;
-    NPN_Invoke(mNpp, doc, sCreateTextNode_id, &strv, 1, &textv);
-
-    NPVariant v;
-    NPN_Invoke(mNpp, NPVARIANT_TO_OBJECT(divv), sAppendChild_id, &textv, 1,
-               &v);
-    NPN_ReleaseVariantValue(&v);
-
-    NPN_ReleaseVariantValue(&textv);
-
-    NPVariant bodyv;
-    NPN_GetProperty(mNpp, doc, sBody_id, &bodyv);
-
-    NPN_Invoke(mNpp, NPVARIANT_TO_OBJECT(bodyv), sAppendChild_id, &divv, 1,
-               &v);
-    NPN_ReleaseVariantValue(&v);
-
-    NPN_ReleaseVariantValue(&divv);
-    NPN_ReleaseVariantValue(&bodyv);
-
-    NPN_ReleaseVariantValue(&docv);
-
-    const char* outString = "foo return val";
-    char* npOutString = (char *)NPN_MemAlloc(strlen(outString) + 1);
-    if (!npOutString)
-      return false;
-    strcpy(npOutString, outString);
-    STRINGZ_TO_NPVARIANT(npOutString, *result);
-
-    return true;
-  }
-
-  return false;
-}
-
-bool
-ScriptablePluginObject::InvokeDefault(const NPVariant *args, uint32_t argCount,
-                                      NPVariant *result)
-{
-  printf ("ScriptablePluginObject default method called!\n");
-
-  const char* outString = "default method return val";
-  char* npOutString = (char *)NPN_MemAlloc(strlen(outString) + 1);
-  if (!npOutString)
-    return false;
-  strcpy(npOutString, outString);
-  STRINGZ_TO_NPVARIANT(npOutString, *result);
-
-  return true;
-}
-
-CPlugin::CPlugin(NPP pNPInstance) :
-  m_pNPInstance(pNPInstance),
-  m_pNPStream(NULL),
-  m_bInitialized(false),
-  m_pScriptableObject(NULL)
-{
-#ifdef XP_WIN
-  m_hWnd = NULL;
-#endif
-
-  NPN_GetValue(m_pNPInstance, NPNVWindowNPObject, &sWindowObj);
-
-  NPIdentifier n = NPN_GetStringIdentifier("foof");
-
-  sFoo_id = NPN_GetStringIdentifier("foo");
-  sBar_id = NPN_GetStringIdentifier("bar");
-  sDocument_id = NPN_GetStringIdentifier("document");
-  sBody_id = NPN_GetStringIdentifier("body");
-  sCreateElement_id = NPN_GetStringIdentifier("createElement");
-  sCreateTextNode_id = NPN_GetStringIdentifier("createTextNode");
-  sAppendChild_id = NPN_GetStringIdentifier("appendChild");
-  sPluginType_id = NPN_GetStringIdentifier("PluginType");
-
-  NPVariant v;
-  INT32_TO_NPVARIANT(46, v);
-
-  NPN_SetProperty(m_pNPInstance, sWindowObj, n, &v);
-
-  NPVariant rval;
-  NPN_GetProperty(m_pNPInstance, sWindowObj, n, &rval);
-
-  if (NPVARIANT_IS_INT32(rval)) {
-    printf("rval = %d\n", NPVARIANT_TO_INT32(rval));
-  }
-
-  n = NPN_GetStringIdentifier("document");
-
-  if (!NPN_IdentifierIsString(n)) {
-    NPString str;
-    str.UTF8Characters = "alert('NPN_IdentifierIsString() test failed!');";
-    str.UTF8Length = strlen(str.UTF8Characters);
-
-    NPN_Evaluate(m_pNPInstance, sWindowObj, &str, NULL);
-  }
-
-  NPObject *doc;
-
-  NPN_GetProperty(m_pNPInstance, sWindowObj, n, &rval);
-
-  if (NPVARIANT_IS_OBJECT(rval) && (doc = NPVARIANT_TO_OBJECT(rval))) {
-    n = NPN_GetStringIdentifier("title");
-
-    NPN_GetProperty(m_pNPInstance, doc, n, &rval);
-
-    if (NPVARIANT_IS_STRING(rval)) {
-      printf ("title = %s\n", NPVARIANT_TO_STRING(rval).UTF8Characters);
-
-      NPN_ReleaseVariantValue(&rval);
-    }
-
-    n = NPN_GetStringIdentifier("plugindoc");
-
-    OBJECT_TO_NPVARIANT(doc, v);
-    NPN_SetProperty(m_pNPInstance, sWindowObj, n, &v);
-
-    NPString str;
-    str.UTF8Characters = "document.getElementById('result').innerHTML += '<p>' + 'NPN_Evaluate() test, document = ' + this + '</p>';";
-    str.UTF8Length = strlen(str.UTF8Characters);
-
-    NPN_Evaluate(m_pNPInstance, doc, &str, NULL);
-
-    NPN_ReleaseObject(doc);
-  }
-
-  NPVariant barval;
-  NPN_GetProperty(m_pNPInstance, sWindowObj, sBar_id, &barval);
-
-  NPVariant arg;
-  OBJECT_TO_NPVARIANT(sWindowObj, arg);
-
-  NPN_InvokeDefault(m_pNPInstance, NPVARIANT_TO_OBJECT(barval), &arg, 1,
-                    &rval);
-
-  if (NPVARIANT_IS_INT32(rval) && NPVARIANT_TO_INT32(rval) == 4) {
-    printf ("Default function call SUCCEEDED!\n");
-  } else {
-    printf ("Default function call FAILED!\n");
-  }
-
-  NPN_ReleaseVariantValue(&barval);
-  NPN_ReleaseVariantValue(&rval);
-
-
-#if 0
-  n = NPN_GetStringIdentifier("prompt");
-
-  NPVariant vars[3];
-  STRINGZ_TO_NPVARIANT("foo", vars[0]);
-  STRINGZ_TO_NPVARIANT("bar", vars[1]);
-  STRINGZ_TO_NPVARIANT("foof", vars[2]);
-
-  NPN_Invoke(sWindowObj, n, vars, 3, &rval);
-
-  if (NPVARIANT_IS_STRING(rval)) {
-    printf ("prompt returned '%s'\n", NPVARIANT_TO_STRING(rval).UTF8Characters);
-  }
-
-  NPN_ReleaseVariantValue(&rval);
-#endif
-
-  NPObject *myobj =
-    NPN_CreateObject(m_pNPInstance,
-                     GET_NPOBJECT_CLASS(ScriptablePluginObject));
-
-  n = NPN_GetStringIdentifier("pluginobj");
-
-  OBJECT_TO_NPVARIANT(myobj, v);
-  NPN_SetProperty(m_pNPInstance, sWindowObj, n, &v);
-
-  NPN_GetProperty(m_pNPInstance, sWindowObj, n, &rval);
-
-  printf ("Object set/get test ");
-
-  if (NPVARIANT_IS_OBJECT(rval) && NPVARIANT_TO_OBJECT(rval) == myobj) {
-    printf ("succeeded!\n");
-  } else {
-    printf ("FAILED!\n");
-  }
-
-  NPN_ReleaseVariantValue(&rval);
-  NPN_ReleaseObject(myobj);
-
-  const char *ua = NPN_UserAgent(m_pNPInstance);
-  strcpy(m_String, ua);
-}
-
-CPlugin::~CPlugin()
-{
-  if (sWindowObj)
-    NPN_ReleaseObject(sWindowObj);
-  if (m_pScriptableObject)
-    NPN_ReleaseObject(m_pScriptableObject);
-
-  sWindowObj = 0;
-}
-
-#ifdef XP_WIN
-static LRESULT CALLBACK PluginWinProc(HWND, UINT, WPARAM, LPARAM);
-static WNDPROC lpOldProc = NULL;
-#endif
-
-NPBool CPlugin::init(NPWindow* pNPWindow)
-{
-  if(pNPWindow == NULL)
-    return false;
-
-#ifdef XP_WIN
-  m_hWnd = (HWND)pNPWindow->window;
-  if(m_hWnd == NULL)
-    return false;
-
-  // subclass window so we can intercept window messages and
-  // do our drawing to it
-  lpOldProc = SubclassWindow(m_hWnd, (WNDPROC)PluginWinProc);
-
-  // associate window with our CPlugin object so we can access 
-  // it in the window procedure
-  SetWindowLongPtr(m_hWnd, GWLP_USERDATA, (LONG_PTR)this);
-#endif
-
-  m_Window = pNPWindow;
-
-  m_bInitialized = true;
-  return true;
-}
-
-void CPlugin::shut()
-{
-#ifdef XP_WIN
-  // subclass it back
-  SubclassWindow(m_hWnd, lpOldProc);
-  m_hWnd = NULL;
-#endif
-
-  m_bInitialized = false;
-}
-
-NPBool CPlugin::isInitialized()
-{
-  return m_bInitialized;
-}
-
-int16_t CPlugin::handleEvent(void* event)
-{
-#ifdef XP_MAC
-  NPEvent* ev = (NPEvent*)event;
-  if (m_Window) {
-    Rect box = { m_Window->y, m_Window->x,
-                 m_Window->y + m_Window->height, m_Window->x + m_Window->width };
-    if (ev->what == updateEvt) {
-      ::TETextBox(m_String, strlen(m_String), &box, teJustCenter);
-    }
-  }
-#endif
-  return 0;
-}
-
-// this will force to draw a version string in the plugin window
-void CPlugin::showVersion()
-{
-  const char *ua = NPN_UserAgent(m_pNPInstance);
-  strcpy(m_String, ua);
-
-#ifdef XP_WIN
-  InvalidateRect(m_hWnd, NULL, true);
-  UpdateWindow(m_hWnd);
-#endif
-
-  if (m_Window) {
-    NPRect r =
-      {
-        (uint16_t)m_Window->y, (uint16_t)m_Window->x,
-        (uint16_t)(m_Window->y + m_Window->height),
-        (uint16_t)(m_Window->x + m_Window->width)
-      };
-
-    NPN_InvalidateRect(m_pNPInstance, &r);
-  }
-}
-
-// this will clean the plugin window
-void CPlugin::clear()
-{
-  strcpy(m_String, "");
-
-#ifdef XP_WIN
-  InvalidateRect(m_hWnd, NULL, true);
-  UpdateWindow(m_hWnd);
-#endif
-}
-
-void CPlugin::getVersion(char* *aVersion)
-{
-  const char *ua = NPN_UserAgent(m_pNPInstance);
-  char*& version = *aVersion;
-  version = (char*)NPN_MemAlloc(1 + strlen(ua));
-  if (version)
-    strcpy(version, ua);
-}
-
-NPObject *
-CPlugin::GetScriptableObject()
-{
-  if (!m_pScriptableObject) {
-    m_pScriptableObject =
-      NPN_CreateObject(m_pNPInstance,
-                       GET_NPOBJECT_CLASS(ScriptablePluginObject));
-  }
-
-  if (m_pScriptableObject) {
-    NPN_RetainObject(m_pScriptableObject);
-  }
-
-  return m_pScriptableObject;
-}
-
-#ifdef XP_WIN
-static LRESULT CALLBACK PluginWinProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
-{
-  switch (msg) {
-    case WM_PAINT:
-      {
-        // draw a frame and display the string
-        PAINTSTRUCT ps;
-        HDC hdc = BeginPaint(hWnd, &ps);
-        RECT rc;
-        GetClientRect(hWnd, &rc);
-        FrameRect(hdc, &rc, GetStockBrush(BLACK_BRUSH));
-        CPlugin * p = (CPlugin *)GetWindowLongPtr(hWnd, GWLP_USERDATA);
-        if(p) {
-          if (p->m_String[0] == 0) {
-            strcpy("foo", p->m_String);
-          }
-
-          DrawText(hdc, p->m_String, strlen(p->m_String), &rc, DT_SINGLELINE | DT_CENTER | DT_VCENTER);
-        }
-
-        EndPaint(hWnd, &ps);
-      }
-      break;
-    default:
-      break;
-  }
-
-  return DefWindowProc(hWnd, msg, wParam, lParam);
-}
-#endif
deleted file mode 100644
--- a/modules/plugin/sdk/samples/npruntime/plugin.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: NPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Netscape Public License
- * Version 1.1 (the "License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License at
- * http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is 
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or 
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the NPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the NPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef __PLUGIN_H__
-#define __PLUGIN_H__
-
-#include "npapi.h"
-#include "npruntime.h"
-
-class CPlugin
-{
-private:
-  NPP m_pNPInstance;
-
-#ifdef XP_WIN
-  HWND m_hWnd; 
-#endif
-
-  NPWindow * m_Window;
-  
-  NPStream * m_pNPStream;
-  NPBool m_bInitialized;
-
-  NPObject *m_pScriptableObject;
-
-public:
-  char m_String[128];
-
-public:
-  CPlugin(NPP pNPInstance);
-  ~CPlugin();
-
-  NPBool init(NPWindow* pNPWindow);
-  void shut();
-  NPBool isInitialized();
-  
-  int16_t handleEvent(void* event);
-
-  void showVersion();
-  void clear();
-  void getVersion(char* *aVersion);
-
-  NPObject *GetScriptableObject();
-};
-
-#endif // __PLUGIN_H__
deleted file mode 100644
--- a/modules/plugin/sdk/samples/npruntime/readme.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-NPRuntime Plugin
-
-This sample plugin can be scripted, JavaScript can call into the plugin via NPRuntime.
deleted file mode 100644
--- a/modules/plugin/sdk/samples/npruntime/resource.h
+++ /dev/null
@@ -1,20 +0,0 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Developer Studio generated include file.
-// Used by np4xscr.rc
-//
-#define IDD_MAIN                        101
-#define IDC_BUTTON_GO                   1002
-#define IDC_STATIC_UA                   1003
-#define IDC_BUTTON1                     1005
-#define IDC_BUTTON_DONT                 1005
-
-// Next default values for new objects
-// 
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE        102
-#define _APS_NEXT_COMMAND_VALUE         40001
-#define _APS_NEXT_CONTROL_VALUE         1006
-#define _APS_NEXT_SYMED_VALUE           101
-#endif
-#endif
deleted file mode 100644
--- a/modules/plugin/sdk/samples/npruntime/test.html
+++ /dev/null
@@ -1,61 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>Scriptable Plug-in Test</TITLE>
-</HEAD>
-<BODY id="bodyId">
-
-<center>
-<h1>Sample Scriptable Plug-in </h1>
-</center>
-
-This page contains a testcase which demonstrates the work of
-scriptable 4.x style Navigator plug-in with Mozilla. The example
-plug-in occupies the area right below this text, and you should see a
-frame the plug-in draws around its window. Below the plug-in window
-there are two buttons. Clicking on the buttons will result in calling
-native plugin methods from JavaScript. Show Version will instruct the
-plug-in to retrieve the Mozilla user agent string and display it in
-the plug-in window, Clear button will call plug-in method to erase the
-window.
-
-<br><br>
-
-<center>
-
-<script>
-function bar(arg)
-{
-  document.getElementById("result").innerHTML += "<p>" + "function bar(" + arg + ") called!" + "</p>";
-
-  return 4;
-}
-</script>
-
-<div id="result">
-<p>results go here:</p>
-</div>
-
-<embed id="embed1" type="application/mozilla-npruntime-scriptable-plugin" width=600 height=40><br>
-
-<embed type="application/x-java-mozilla-npruntime-scriptable-plugin" style="display: block; width: 50%; height: 100px;"><br>
-
-<script>
-var embed1 = document.getElementById('embed1');
-</script>
-
-<br>
-<form name="formname">
-<input type=button value="Call pluginobj.foo()" onclick='alert(pluginobj.foo())'>
-<input type=button value="alert(pluginobj.bar)" onclick='alert(pluginobj.bar)'>
-<input type=button value="alert(pluginobj('foo'))" onclick='alert(pluginobj("foo"))'>
-<br>
-<input type=button value="alert(embed1.bar)" onclick='alert(embed1.bar)'>
-<input type=button value="alert(embed1.foo())" onclick='alert(embed1.foo())'>
-<input type=button value="alert(embed1())" onclick='alert(embed1())'>
-<input type=button value="embed1.bar='foo'" onclick='embed1.bar="foo";'>
-</form>
-
-</center>
-
-</BODY>
-</HTML>
deleted file mode 100644
--- a/modules/plugin/sdk/samples/npthread/readme.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-NPThread Plugin
-
-This sample is an attempt to write a wrapper plugin which would run the
-real plugin in a separate thread. The current code is just a first prototype
-version aimed to determine the very possibility of such thing. It is not
-designed to handle more than one instance of one plugin. Another limitations
-are: it only relays browser-to-plugin calls in thread event based matter
-(calls from the plugin to the browser are just made directly by function
-pointer; it does not implement notifications back from the plugin thread
-to the calling thread, so it simply waits before each NPP_* call until
-the plugin thread is done with the previous NPP_* call.
-
-The wrapper tested with Basic plugin sample from the plugin
-SDK, so some common plugin crashes can be modelled. Work is still
-required to make it functional with more complicated plugins
-like Flash.
-
-Steps to see it in action:
-
-  -- place the wrapper plugin (npthread.dll) in the plugins folder
-  -- remove npnul32.dll from the plugins folder
-  -- rename the plugin you want to run in a separate thread adding
-     two zeroes at the beginnig (ren npbasic.dll 00npbasic.dll)
-  -- run test case for the plugin in question
deleted file mode 100644
--- a/modules/plugin/sdk/samples/npthread/windows/action.cpp
+++ /dev/null
@@ -1,161 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "action.h"
-
-char * FormatAction(int aAction)
-{
-  static char string[64] = {'\0'};
-  switch (aAction) {
-    case action_invalid:
-      strcpy(string, "invalid action");
-      break;
-    case action_npn_version:
-      strcpy(string, "npn_version");
-      break;
-    case action_npn_get_url_notify:
-      strcpy(string, "npn_get_url_notify");
-      break;
-    case action_npn_get_url:
-      strcpy(string, "npn_get_url");
-      break;
-    case action_npn_post_url_notify:
-      strcpy(string, "npn_post_url_notify");
-      break;
-    case action_npn_post_url:
-      strcpy(string, "npn_post_url");
-      break;
-    case action_npn_request_read:
-      strcpy(string, "npn_request_read");
-      break;
-    case action_npn_new_stream:
-      strcpy(string, "npn_new_stream");
-      break;
-    case action_npn_write:
-      strcpy(string, "npn_write");
-      break;
-    case action_npn_destroy_stream:
-      strcpy(string, "npn_destroy_stream");
-      break;
-    case action_npn_status:
-      strcpy(string, "npn_status");
-      break;
-    case action_npn_user_agent:
-      strcpy(string, "npn_user_agent");
-      break;
-    case action_npn_mem_alloc:
-      strcpy(string, "npn_mem_alloc");
-      break;
-    case action_npn_mem_free:
-      strcpy(string, "npn_mem_free");
-      break;
-    case action_npn_mem_flush:
-      strcpy(string, "npn_mem_flush");
-      break;
-    case action_npn_reload_plugins:
-      strcpy(string, "npn_reload_plugins");
-      break;
-    case action_npn_get_java_env:
-      strcpy(string, "npn_get_java_env");
-      break;
-    case action_npn_get_java_peer:
-      strcpy(string, "npn_get_java_peer");
-      break;
-    case action_npn_get_value:
-      strcpy(string, "npn_get_value");
-      break;
-    case action_npn_set_value:
-      strcpy(string, "npn_set_value");
-      break;
-    case action_npn_invalidate_rect:
-      strcpy(string, "npn_invalidate_rect");
-      break;
-    case action_npn_invalidate_region:
-      strcpy(string, "npn_invalidate_region");
-      break;
-    case action_npn_force_redraw:
-      strcpy(string, "npn_force_redraw");
-      break;
- 
-    case action_npp_new:
-      strcpy(string, "npp_new");
-      break;
-    case action_npp_destroy:
-      strcpy(string, "npp_destroy");
-      break;
-    case action_npp_set_window:
-      strcpy(string, "npp_set_window");
-      break;
-    case action_npp_new_stream:
-      strcpy(string, "npp_new_stream");
-      break;
-    case action_npp_destroy_stream:
-      strcpy(string, "npp_destroy_stream");
-      break;
-    case action_npp_stream_as_file:
-      strcpy(string, "npp_stream_as_file");
-      break;
-    case action_npp_write_ready:
-      strcpy(string, "npp_write_ready");
-      break;
-    case action_npp_write:
-      strcpy(string, "npp_write");
-      break;
-    case action_npp_print:
-      strcpy(string, "npp_print");
-      break;
-    case action_npp_handle_event:
-      strcpy(string, "npp_handle_event");
-      break;
-    case action_npp_url_notify:
-      strcpy(string, "npp_url_notify");
-      break;
-    case action_npp_get_java_class:
-      strcpy(string, "npp_get_java_class");
-      break;
-    case action_npp_get_value:
-      strcpy(string, "npp_get_value");
-      break;
-    case action_npp_set_value:
-      strcpy(string, "npp_set_value");
-      break;
-    default:
-      strcpy(string, "Unknown action!");
-      break;
-  }
-  return string;
-} 
deleted file mode 100644
--- a/modules/plugin/sdk/samples/npthread/windows/action.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef __ACTION_H__
-#define __ACTION_H__
-
-#include "npapi.h"
-
-typedef enum
-{
-  action_invalid = 0,
-  action_npn_version,
-  action_npn_get_url_notify,
-  action_npn_get_url,
-  action_npn_post_url_notify,
-  action_npn_post_url,
-  action_npn_request_read,
-  action_npn_new_stream,
-  action_npn_write,
-  action_npn_destroy_stream,
-  action_npn_status,
-  action_npn_user_agent,
-  action_npn_mem_alloc,
-  action_npn_mem_free,
-  action_npn_mem_flush,
-  action_npn_reload_plugins,
-  action_npn_get_java_env,
-  action_npn_get_java_peer,
-  action_npn_get_value,
-  action_npn_set_value,
-  action_npn_invalidate_rect,
-  action_npn_invalidate_region,
-  action_npn_force_redraw,
-
-  action_npp_new, // 23
-  action_npp_destroy,
-  action_npp_set_window,
-  action_npp_new_stream,
-  action_npp_destroy_stream,
-  action_npp_stream_as_file,
-  action_npp_write_ready,
-  action_npp_write,
-  action_npp_print,
-  action_npp_handle_event,
-  action_npp_url_notify,
-  action_npp_get_java_class,
-  action_npp_get_value,
-  action_npp_set_value
-} npapiAction;
-
-char * FormatAction(int aAction);
-
-#endif // __ACTION_H__
deleted file mode 100644
--- a/modules/plugin/sdk/samples/npthread/windows/dbg.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include <windows.h>
-
-#ifndef NTRACE
-void __cdecl dbgOut(LPSTR format, ...) { 
-  static char buf[1024];
-  va_list  va;
-  va_start(va, format);
-  wvsprintf(buf, format, va);
-  va_end(va);
-  lstrcat(buf, "\n");
-  OutputDebugString(buf); 
-}
-#endif  // NDEBUG
-
deleted file mode 100644
--- a/modules/plugin/sdk/samples/npthread/windows/dbg.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef __DBG_HPP_
-#define __DBG_HPP_
-
-#ifdef NTRACE
-
-#define dbgOut1(x)        ((void)0)
-#define dbgOut2(x,y)      ((void)0)
-#define dbgOut3(x,y,z)      ((void)0)
-#define dbgOut4(x,y,z,t)    ((void)0)
-#define dbgOut5(x,y,z,t,u)    ((void)0)
-#define dbgOut6(x,y,z,t,u,v)  ((void)0)
-#define dbgOut7(x,y,z,t,u,v,a)  ((void)0)
-#define dbgOut8(x,y,z,t,u,v,a,b)  ((void)0)
-
-#else
-
-void __cdecl dbgOut(LPSTR format, ...);
-#define dbgOut1(x)        dbgOut(x)
-#define dbgOut2(x,y)      dbgOut(x, y)
-#define dbgOut3(x,y,z)      dbgOut(x, y, z)
-#define dbgOut4(x,y,z,t)    dbgOut(x, y, z, t)
-#define dbgOut5(x,y,z,t,u)    dbgOut(x, y, z, t, u)
-#define dbgOut6(x,y,z,t,u,v)  dbgOut(x, y, z, t, u, v)
-#define dbgOut7(x,y,z,t,u,v, a)  dbgOut(x, y, z, t, u, v, a)
-#define dbgOut8(x,y,z,t,u,v, a, b)  dbgOut(x, y, z, t, u, v, a, b)
-
-#endif
-#endif
deleted file mode 100644
--- a/modules/plugin/sdk/samples/npthread/windows/np_entry.cpp
+++ /dev/null
@@ -1,118 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "npapi.h"
-#include "npfunctions.h"
-#include "dbg.h"
-
-NPNetscapeFuncs NPNFuncs;
-
-NPError WINAPI NP_GetEntryPoints(NPPluginFuncs* aPluginFuncs)
-{
-  dbgOut1("wrapper: NP_GetEntryPoints");
-
-  if(aPluginFuncs == NULL)
-    return NPERR_INVALID_FUNCTABLE_ERROR;
-
-  if(aPluginFuncs->size < sizeof(NPPluginFuncs))
-    return NPERR_INVALID_FUNCTABLE_ERROR;
-
-  aPluginFuncs->version       = (NP_VERSION_MAJOR << 8) | NP_VERSION_MINOR;
-  aPluginFuncs->newp          = NPP_New;
-  aPluginFuncs->destroy       = NPP_Destroy;
-  aPluginFuncs->setwindow     = NPP_SetWindow;
-  aPluginFuncs->newstream     = NPP_NewStream;
-  aPluginFuncs->destroystream = NPP_DestroyStream;
-  aPluginFuncs->asfile        = NPP_StreamAsFile;
-  aPluginFuncs->writeready    = NPP_WriteReady;
-  aPluginFuncs->write         = NPP_Write;
-  aPluginFuncs->print         = NPP_Print;
-  aPluginFuncs->event         = NPP_HandleEvent;
-  aPluginFuncs->urlnotify     = NPP_URLNotify;
-  aPluginFuncs->getvalue      = NPP_GetValue;
-  aPluginFuncs->setvalue      = NPP_SetValue;
-  aPluginFuncs->javaClass     = NULL;
-
-  return NPERR_NO_ERROR;
-}
-
-NPError WINAPI NP_Initialize(NPNetscapeFuncs* aNetscapeFuncs)
-{
-  dbgOut1("wrapper: NP_Initialize");
-
-  if(aNetscapeFuncs == NULL)
-    return NPERR_INVALID_FUNCTABLE_ERROR;
-
-  if(HIBYTE(aNetscapeFuncs->version) > NP_VERSION_MAJOR)
-    return NPERR_INCOMPATIBLE_VERSION_ERROR;
-
-  if(aNetscapeFuncs->size < sizeof NPNetscapeFuncs)
-    return NPERR_INVALID_FUNCTABLE_ERROR;
-
-  NPNFuncs.size             = aNetscapeFuncs->size;
-  NPNFuncs.version          = aNetscapeFuncs->version;
-  NPNFuncs.geturlnotify     = aNetscapeFuncs->geturlnotify;
-  NPNFuncs.geturl           = aNetscapeFuncs->geturl;
-  NPNFuncs.posturlnotify    = aNetscapeFuncs->posturlnotify;
-  NPNFuncs.posturl          = aNetscapeFuncs->posturl;
-  NPNFuncs.requestread      = aNetscapeFuncs->requestread;
-  NPNFuncs.newstream        = aNetscapeFuncs->newstream;
-  NPNFuncs.write            = aNetscapeFuncs->write;
-  NPNFuncs.destroystream    = aNetscapeFuncs->destroystream;
-  NPNFuncs.status           = aNetscapeFuncs->status;
-  NPNFuncs.uagent           = aNetscapeFuncs->uagent;
-  NPNFuncs.memalloc         = aNetscapeFuncs->memalloc;
-  NPNFuncs.memfree          = aNetscapeFuncs->memfree;
-  NPNFuncs.memflush         = aNetscapeFuncs->memflush;
-  NPNFuncs.reloadplugins    = aNetscapeFuncs->reloadplugins;
-  NPNFuncs.getJavaEnv       = NULL;
-  NPNFuncs.getJavaPeer      = NULL;
-  NPNFuncs.getvalue         = aNetscapeFuncs->getvalue;
-  NPNFuncs.setvalue         = aNetscapeFuncs->setvalue;
-  NPNFuncs.invalidaterect   = aNetscapeFuncs->invalidaterect;
-  NPNFuncs.invalidateregion = aNetscapeFuncs->invalidateregion;
-  NPNFuncs.forceredraw      = aNetscapeFuncs->forceredraw;
-
-  return NPERR_NO_ERROR;
-}
-
-NPError WINAPI NP_Shutdown()
-{
-  dbgOut1("wrapper:NP_Shutdown");
-
-  return NPERR_NO_ERROR;
-}
deleted file mode 100644
--- a/modules/plugin/sdk/samples/npthread/windows/npn_gate.cpp
+++ /dev/null
@@ -1,242 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "npapi.h"
-#include "npfunctions.h"
-#include "dbg.h"
-
-extern NPNetscapeFuncs NPNFuncs;
-
-void NPN_Version(int* plugin_major, int* plugin_minor, int* netscape_major, int* netscape_minor)
-{
-  dbgOut1("wrapper: NPN_Version");
-
-  *plugin_major   = NP_VERSION_MAJOR;
-  *plugin_minor   = NP_VERSION_MINOR;
-  *netscape_major = HIBYTE(NPNFuncs.version);
-  *netscape_minor = LOBYTE(NPNFuncs.version);
-}
-
-NPError NPN_GetURLNotify(NPP instance, const char *url, const char *target, void* notifyData)
-{
-  dbgOut1("wrapper: NPN_GetURLNotify");
-
-	int navMinorVers = NPNFuncs.version & 0xFF;
-	
-  NPError rv = NPERR_NO_ERROR;
-
-  if( navMinorVers >= NPVERS_HAS_NOTIFICATION )
-		rv = NPNFuncs.geturlnotify(instance, url, target, notifyData);
-	else
-		rv = NPERR_INCOMPATIBLE_VERSION_ERROR;
-
-  return rv;
-}
-
-NPError NPN_GetURL(NPP instance, const char *url, const char *target)
-{
-  dbgOut1("wrapper: NPN_GetURL");
-
-  NPError rv = NPNFuncs.geturl(instance, url, target);
-  return rv;
-}
-
-NPError NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file, void* notifyData)
-{
-  dbgOut1("wrapper: NPN_PostURLNotify");
-
-	int navMinorVers = NPNFuncs.version & 0xFF;
-
-  NPError rv = NPERR_NO_ERROR;
-
-	if( navMinorVers >= NPVERS_HAS_NOTIFICATION )
-		rv = NPNFuncs.posturlnotify(instance, url, window, len, buf, file, notifyData);
-	else
-		rv = NPERR_INCOMPATIBLE_VERSION_ERROR;
-
-  return rv;
-}
-
-NPError NPN_PostURL(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file)
-{
-  dbgOut1("wrapper: NPN_PostURL");
-
-  NPError rv = NPNFuncs.posturl(instance, url, window, len, buf, file);
-  return rv;
-} 
-
-NPError NPN_RequestRead(NPStream* stream, NPByteRange* rangeList)
-{
-  dbgOut1("wrapper: NPN_RequestRead");
-
-  NPError rv = NPNFuncs.requestread(stream, rangeList);
-  return rv;
-}
-
-NPError NPN_NewStream(NPP instance, NPMIMEType type, const char* target, NPStream** stream)
-{
-  dbgOut1("wrapper: NPN_NewStream");
-
-	int navMinorVersion = NPNFuncs.version & 0xFF;
-
-  NPError rv = NPERR_NO_ERROR;
-
-	if( navMinorVersion >= NPVERS_HAS_STREAMOUTPUT )
-		rv = NPNFuncs.newstream(instance, type, target, stream);
-	else
-		rv = NPERR_INCOMPATIBLE_VERSION_ERROR;
-
-  return rv;
-}
-
-int32 NPN_Write(NPP instance, NPStream *stream, int32 len, void *buffer)
-{
-  dbgOut1("wrapper: NPN_Write");
-
-	int navMinorVersion = NPNFuncs.version & 0xFF;
-
-  int32 rv = 0;
-
-  if( navMinorVersion >= NPVERS_HAS_STREAMOUTPUT )
-		rv = NPNFuncs.write(instance, stream, len, buffer);
-	else
-		rv = -1;
-
-  return rv;
-}
-
-NPError NPN_DestroyStream(NPP instance, NPStream* stream, NPError reason)
-{
-  dbgOut1("wrapper: NPN_DestroyStream");
-
-	int navMinorVersion = NPNFuncs.version & 0xFF;
-
-  NPError rv = NPERR_NO_ERROR;
-
-  if( navMinorVersion >= NPVERS_HAS_STREAMOUTPUT )
-		rv = NPNFuncs.destroystream(instance, stream, reason);
-	else
-		rv = NPERR_INCOMPATIBLE_VERSION_ERROR;
-
-  return rv;
-}
-
-void NPN_Status(NPP instance, const char *message)
-{
-  dbgOut1("wrapper: NPN_Status");
-
-  NPNFuncs.status(instance, message);
-}
-
-const char* NPN_UserAgent(NPP instance)
-{
-  dbgOut1("wrapper: NPN_UserAgent");
-
-  const char * rv = NULL;
-  rv = NPNFuncs.uagent(instance);
-  return rv;
-}
-
-void* NPN_MemAlloc(uint32 size)
-{
-  //bgOut1("wrapper: NPN_MemAlloc");
-
-  void * rv = NULL;
-  rv = NPNFuncs.memalloc(size);
-  return rv;
-}
-
-void NPN_MemFree(void* ptr)
-{
-  //dbgOut1("wrapper: NPN_MemFree");
-
-  NPNFuncs.memfree(ptr);
-}
-
-uint32 NPN_MemFlush(uint32 size)
-{
-  dbgOut1("wrapper: NPN_MemFlush");
-
-  uint32 rv = NPNFuncs.memflush(size);
-  return rv;
-}
-
-void NPN_ReloadPlugins(NPBool reloadPages)
-{
-  dbgOut1("wrapper: NPN_ReloadPlugins");
-
-  NPNFuncs.reloadplugins(reloadPages);
-}
-
-NPError NPN_GetValue(NPP instance, NPNVariable variable, void *value)
-{
-  dbgOut1("wrapper: NPN_GetValue");
-
-  NPError rv = NPERR_NO_ERROR;
-  rv = NPNFuncs.getvalue(instance, variable, value);
-  return rv;
-}
-
-NPError NPN_SetValue(NPP instance, NPPVariable variable, void *value)
-{
-  dbgOut1("wrapper: NPN_SetValue");
-
-  NPError rv = NPERR_NO_ERROR;
-  rv = NPNFuncs.setvalue(instance, variable, value);
-  return rv;
-}
-
-void NPN_InvalidateRect(NPP instance, NPRect *invalidRect)
-{
-  dbgOut1("wrapper: NPN_InvalidateRect");
-
-  NPNFuncs.invalidaterect(instance, invalidRect);
-}
-
-void NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion)
-{
-  dbgOut1("wrapper: NPN_InvalidateRegion");
-
-  NPNFuncs.invalidateregion(instance, invalidRegion);
-}
-
-void NPN_ForceRedraw(NPP instance)
-{
-  dbgOut1("wrapper: ForceRedraw");
-
-  NPNFuncs.forceredraw(instance);
-}
deleted file mode 100644
--- a/modules/plugin/sdk/samples/npthread/windows/npp_gate.cpp
+++ /dev/null
@@ -1,182 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "windows.h"
-
-#include "npfunctions.h"
-#include "npapi.h"
-#include "plugin.h"
-#include "dbg.h"
-
-nsPluginThread * thePluginThread = NULL;
-
-NPError NPP_New(NPMIMEType aType,
-                NPP aInstance,
-                uint16 aMode,
-                int16 aArgc,
-                char* aArgn[],
-                char* aArgv[],
-                NPSavedData* aSaved)
-{   
-  dbgOut1("wrapper: NPP_New");
-
-  NPError rv = NPERR_NO_ERROR;
-
-  // lamely assuming there is only one embed tag on the page!
-  
-  // if it is first time in, we don't have it yet
-  // initiate a thread with plugin running in it
-  thePluginThread = new nsPluginThread((DWORD)aType);
-
-  if (!thePluginThread)
-    return NPERR_GENERIC_ERROR;
-
-  rv = (NPError)thePluginThread->callNPP(action_npp_new, 
-                                         (DWORD)aType, 
-                                         (DWORD)aInstance, 
-                                         (DWORD)aMode, 
-                                         (DWORD)aArgc, 
-                                         (DWORD)aArgn, 
-                                         (DWORD)aArgv, 
-                                         (DWORD)aSaved);
-
-  return rv;
-}
-
-NPError NPP_Destroy (NPP aInstance, NPSavedData** aSave)
-{
-  dbgOut1("wrapper: NPP_Destroy");
-
-  if (!thePluginThread)
-    return NPERR_GENERIC_ERROR;
-
-  NPError ret = (NPError)thePluginThread->callNPP(action_npp_destroy, (DWORD)aInstance, (DWORD)aSave);
-
-  delete thePluginThread;
-  thePluginThread = NULL;
-
-  return ret;
-}
-
-NPError NPP_SetWindow (NPP aInstance, NPWindow* aNPWindow)
-{    
-  dbgOut1("wrapper: NPP_SetWindow");
-
-  NPError rv = (NPError)thePluginThread->callNPP(action_npp_set_window, (DWORD)aInstance, (DWORD)aNPWindow);
-  return rv;
-}
-
-NPError NPP_NewStream(NPP aInstance,
-                      NPMIMEType aType,
-                      NPStream* aStream, 
-                      NPBool aSeekable,
-                      uint16* aStype)
-{
-  dbgOut1("wrapper: NPP_NewStream");
-
-  NPError rv = (NPError)thePluginThread->callNPP(action_npp_new_stream, (DWORD)aInstance, (DWORD)aType, (DWORD)aStream, (DWORD)aSeekable, (DWORD)aStype);
-  return rv;
-}
-
-int32 NPP_WriteReady (NPP aInstance, NPStream *aStream)
-{
-  dbgOut1("wrapper: NPP_WriteReady");
-
-  int32 rv = (int32)thePluginThread->callNPP(action_npp_write_ready, (DWORD)aInstance, (DWORD)aStream);
-  return rv;
-}
-
-int32 NPP_Write (NPP aInstance, NPStream *aStream, int32 aOffset, int32 len, void *aBuffer)
-{   
-  dbgOut1("wrapper: NPP_Write");
-
-  int32 rv = (int32)thePluginThread->callNPP(action_npp_write, (DWORD)aInstance, (DWORD)aStream, (DWORD)aOffset, (DWORD)len, (DWORD)aBuffer);
-  return rv;
-}
-
-NPError NPP_DestroyStream (NPP aInstance, NPStream *aStream, NPError aReason)
-{
-  dbgOut1("wrapper: NPP_DestroyStream");
-
-  NPError rv = (NPError)thePluginThread->callNPP(action_npp_destroy_stream, (DWORD)aInstance, (DWORD)aStream, (DWORD)aReason);
-  return rv;
-}
-
-void NPP_StreamAsFile (NPP aInstance, NPStream* aStream, const char* aName)
-{
-  dbgOut1("wrapper: NPP_StreamAsFile");
-
-  thePluginThread->callNPP(action_npp_stream_as_file, (DWORD)aInstance, (DWORD)aStream, (DWORD)aName);
-}
-
-void NPP_Print (NPP aInstance, NPPrint* aPrintInfo)
-{
-  dbgOut1("wrapper: NPP_Print");
-
-  thePluginThread->callNPP(action_npp_print, (DWORD)aInstance, (DWORD)aPrintInfo);
-}
-
-void NPP_URLNotify(NPP aInstance, const char* aUrl, NPReason aReason, void* aNotifyData)
-{
-  dbgOut1("wrapper: NPP_URLNotify");
-
-  thePluginThread->callNPP(action_npp_url_notify, (DWORD)aInstance, (DWORD)aUrl, (DWORD)aReason, (DWORD)aNotifyData);
-}
-
-NPError	NPP_GetValue(NPP aInstance, NPPVariable aVariable, void *aValue)
-{
-  dbgOut1("wrapper: NPP_GetValue");
-
-  NPError rv = (NPError)thePluginThread->callNPP(action_npp_get_value, (DWORD)aInstance, (DWORD)aVariable, (DWORD)aValue);
-  return rv;
-}
-
-NPError NPP_SetValue(NPP aInstance, NPNVariable aVariable, void *aValue)
-{
-  dbgOut1("wrapper: NPP_SetValue");
-
-  NPError rv = (NPError)thePluginThread->callNPP(action_npp_set_value, (DWORD)aInstance, (DWORD)aVariable, (DWORD)aValue);
-  return rv;
-}
-
-int16	NPP_HandleEvent(NPP aInstance, void* aEvent)
-{
-  dbgOut1("wrapper: NPP_HandleEvent");
-
-  int16 rv = (int16)thePluginThread->callNPP(action_npp_handle_event, (DWORD)aInstance, (DWORD)aEvent);
-  return rv;
-}
deleted file mode 100644
--- a/modules/plugin/sdk/samples/npthread/windows/npthread.def
+++ /dev/null
@@ -1,6 +0,0 @@
-LIBRARY   NPTHREAD
-
-EXPORTS
-	NP_GetEntryPoints   @1
-	NP_Initialize       @2
-	NP_Shutdown         @3
deleted file mode 100644
--- a/modules/plugin/sdk/samples/npthread/windows/npthread.dsp
+++ /dev/null
@@ -1,162 +0,0 @@
-# Microsoft Developer Studio Project File - Name="npthread" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=npthread - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "npthread.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "npthread.mak" CFG="npthread - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "npthread - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "npthread - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "npthread - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NPTHREAD_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NPTHREAD_EXPORTS" /YX /FD /c
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-
-!ELSEIF  "$(CFG)" == "npthread - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "npthread___Win32_Debug"
-# PROP BASE Intermediate_Dir "npthread___Win32_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NPTHREAD_EXPORTS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\..\..\..\dist\include\plugin" /I "..\..\..\..\..\dist\include\java" /I "..\..\..\..\..\dist\include\nspr" /D "XP_WIN" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NPTHREAD_EXPORTS" /YX /FD /GZ /c
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib version.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-
-!ENDIF 
-
-# Begin Target
-
-# Name "npthread - Win32 Release"
-# Name "npthread - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\action.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\dbg.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\np_entry.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\npn_gate.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\npp_gate.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\npthread.def
-# End Source File
-# Begin Source File
-
-SOURCE=.\npthread.rc
-# End Source File
-# Begin Source File
-
-SOURCE=.\plugin.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\plugload.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\thread.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\action.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\dbg.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\plugin.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\plugload.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\thread.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
deleted file mode 100644
--- a/modules/plugin/sdk/samples/npthread/windows/npthread.dsw
+++ /dev/null
@@ -1,29 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "npthread"=.\npthread.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
deleted file mode 100644
--- a/modules/plugin/sdk/samples/npthread/windows/npthread.rc
+++ /dev/null
@@ -1,112 +0,0 @@
-//Microsoft Developer Studio generated resource script.
-//
-#include "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
-
-#ifndef _MAC
-/////////////////////////////////////////////////////////////////////////////
-//
-// Version
-//
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,0,0,1
- PRODUCTVERSION 1,0,0,1
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x40004L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
-    BLOCK "StringFileInfo"
-    BEGIN
-        BLOCK "040904e4"
-        BEGIN
-            VALUE "Comments", "\0"
-            VALUE "CompanyName", " \0"
-            VALUE "FileDescription", "npthread\0"
-            VALUE "FileExtents", "thr\0"
-            VALUE "FileOpenName", "npthread\0"
-            VALUE "FileVersion", "1, 0, 0, 1\0"
-            VALUE "InternalName", "npthread\0"
-            VALUE "LegalCopyright", "Copyright  2002\0"
-            VALUE "LegalTrademarks", "\0"
-            VALUE "MIMEType", "*\0"
-            VALUE "OriginalFilename", "npthread\0"
-            VALUE "PrivateBuild", "\0"
-            VALUE "ProductName", "Thread plugin wrapper\0"
-            VALUE "ProductVersion", "1, 0, 0, 1\0"
-            VALUE "SpecialBuild", "\0"
-        END
-    END
-    BLOCK "VarFileInfo"
-    BEGIN
-        VALUE "Translation", 0x409, 1252
-    END
-END
-
-#endif    // !_MAC
-
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE DISCARDABLE 
-BEGIN
-    "resource.h\0"
-END
-
-2 TEXTINCLUDE DISCARDABLE 
-BEGIN
-    "#include ""afxres.h""\r\n"
-    "\0"
-END
-
-3 TEXTINCLUDE DISCARDABLE 
-BEGIN
-    "\r\n"
-    "\0"
-END
-
-#endif    // APSTUDIO_INVOKED
-
-#endif    // English (U.S.) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif    // not APSTUDIO_INVOKED
-
deleted file mode 100644
--- a/modules/plugin/sdk/samples/npthread/windows/plugin.cpp
+++ /dev/null
@@ -1,233 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "windows.h"
-
-#include "npfunctions.h"
-#include "npapi.h"
-#include "plugin.h"
-#include "plugload.h"
-#include "dbg.h"
-
-extern NPNetscapeFuncs NPNFuncs;
-NPNetscapeFuncs wrapperNPNFuncs;
-NPPluginFuncs pluginNPPFuncs;
-
-typedef NPError (__stdcall * NP_GETENTRYPOINTS)(NPPluginFuncs *);
-typedef NPError (__stdcall * NP_INITIALIZE)(NPNetscapeFuncs *);
-typedef NPError (__stdcall * NP_SHUTDOWN)(void);
-
-NP_SHUTDOWN plugin_NP_Shutdown = NULL;
-HINSTANCE pluginLibrary = NULL;
-
-nsPluginThread::nsPluginThread(DWORD aP1) : CThread(),
-  mP1(aP1),
-  mP2(0),
-  mP3(0),
-  mP4(0),
-  mP5(0),
-  mP6(0),
-  mP7(0)
-{
-  dbgOut1("nsPluginThread::nsPluginThread");
-
-  open(this);
-}
-
-nsPluginThread::~nsPluginThread()
-{
-  dbgOut1("nsPluginThread::~nsPluginThread");
-
-  close(this);
-}
-
-BOOL nsPluginThread::init()
-{
-  dbgOut1("nsPluginThread::init");
-
-  // scan plugins dir for available plugins to see if we have anything 
-  // for the given mimetype
-  pluginLibrary = LoadRealPlugin((NPMIMEType)mP1);
-  if(!pluginLibrary)
-    return FALSE;
-
-  NP_GETENTRYPOINTS plugin_NP_GetEntryPoints = (NP_GETENTRYPOINTS)GetProcAddress(pluginLibrary, "NP_GetEntryPoints");
-  if(!plugin_NP_GetEntryPoints)
-    return FALSE;
-
-  NP_INITIALIZE plugin_NP_Initialize = (NP_INITIALIZE)GetProcAddress(pluginLibrary, "NP_Initialize");
-  if(!plugin_NP_Initialize)
-    return FALSE;
-
-  plugin_NP_Shutdown = (NP_SHUTDOWN)GetProcAddress(pluginLibrary, "NP_Shutdown");
-  if(!plugin_NP_Shutdown)
-    return FALSE;
-
-  // fill callbacks structs
-  memset(&pluginNPPFuncs, 0, sizeof(NPPluginFuncs));
-  pluginNPPFuncs.size = sizeof(NPPluginFuncs);
-
-  plugin_NP_GetEntryPoints(&pluginNPPFuncs);
-
-  // inform the plugin about our entry point it should call
-  memset((void *)&wrapperNPNFuncs, 0, sizeof(wrapperNPNFuncs));
-  wrapperNPNFuncs.size             = sizeof(wrapperNPNFuncs);
-  wrapperNPNFuncs.version          = NPNFuncs.version;
-  wrapperNPNFuncs.geturlnotify     = NPN_GetURLNotify;
-  wrapperNPNFuncs.geturl           = NPN_GetURL;
-  wrapperNPNFuncs.posturlnotify    = NPN_PostURLNotify;
-  wrapperNPNFuncs.posturl          = NPN_PostURL;
-  wrapperNPNFuncs.requestread      = NPN_RequestRead;
-  wrapperNPNFuncs.newstream        = NPN_NewStream;
-  wrapperNPNFuncs.write            = NPN_Write;
-  wrapperNPNFuncs.destroystream    = NPN_DestroyStream;
-  wrapperNPNFuncs.status           = NPN_Status;
-  wrapperNPNFuncs.uagent           = NPN_UserAgent;
-  wrapperNPNFuncs.memalloc         = NPN_MemAlloc;
-  wrapperNPNFuncs.memfree          = NPN_MemFree;
-  wrapperNPNFuncs.memflush         = NPN_MemFlush;
-  wrapperNPNFuncs.reloadplugins    = NPN_ReloadPlugins;
-  wrapperNPNFuncs.getJavaEnv       = NULL;
-  wrapperNPNFuncs.getJavaPeer      = NULL;
-  wrapperNPNFuncs.getvalue         = NPN_GetValue;
-  wrapperNPNFuncs.setvalue         = NPN_SetValue;
-  wrapperNPNFuncs.invalidaterect   = NPN_InvalidateRect;
-  wrapperNPNFuncs.invalidateregion = NPN_InvalidateRegion;
-  wrapperNPNFuncs.forceredraw      = NPN_ForceRedraw;
-
-  plugin_NP_Initialize(&wrapperNPNFuncs);
-
-  return TRUE;
-}
-
-void nsPluginThread::shut()
-{
-  dbgOut1("nsPluginThread::shut");
-
-  if (!plugin_NP_Shutdown)
-    plugin_NP_Shutdown();
-
-  if (!pluginLibrary)
-    UnloadRealPlugin(pluginLibrary);
-}
-
-// NPP_ call translator
-DWORD nsPluginThread::callNPP(npapiAction aAction, DWORD aP1, DWORD aP2, 
-                              DWORD aP3, DWORD aP4, DWORD aP5, 
-                              DWORD aP6, DWORD aP7)
-{
-  // don't enter until thread is ready
-  while (isBusy()) {
-    Sleep(0);
-  }
-
-  mP1 = aP1;
-  mP2 = aP2;
-  mP3 = aP3;
-  mP4 = aP4;
-  mP5 = aP5;
-  mP6 = aP6;
-  mP7 = aP7;
-
-  doAction(aAction);
-
-  // don't return until thread is ready
-  while (isBusy()) {
-    Sleep(0);
-  }
-
-  return NPERR_NO_ERROR;
-}
-void nsPluginThread::dispatch()
-{
-  dbgOut2("nsPluginThread::dispatch: %s", FormatAction(mAction));
-
-  switch (mAction) {
-    case action_npp_new:
-      pluginNPPFuncs.newp((NPMIMEType)mP1, (NPP)mP2, (uint16)mP3, (int16)mP4, (char**)mP5, (char**)mP6, (NPSavedData*)mP7);
-      break;
-    case action_npp_destroy:
-      pluginNPPFuncs.destroy((NPP)mP1, (NPSavedData**)mP2);
-      break;
-    case action_npp_set_window:
-      pluginNPPFuncs.setwindow((NPP)mP1, (NPWindow*)mP2);
-      break;
-    case action_npp_new_stream:
-      pluginNPPFuncs.newstream((NPP)mP1, (NPMIMEType)mP2, (NPStream*)mP3, (NPBool)mP4, (uint16*)mP5);
-      break;
-    case action_npp_destroy_stream:
-    {
-      NPStream * stream = (NPStream *)mP2;
-      pluginNPPFuncs.destroystream((NPP)mP1, stream, (NPError)mP3);
-      break;
-    }
-    case action_npp_stream_as_file:
-    {
-      NPStream * stream = (NPStream *)mP2;
-      pluginNPPFuncs.asfile((NPP)mP1, stream, (char*)mP3);
-      break;
-    }
-    case action_npp_write_ready:
-      pluginNPPFuncs.writeready((NPP)mP1, (NPStream *)mP2);
-      break;
-    case action_npp_write:
-      pluginNPPFuncs.write((NPP)mP1, (NPStream *)mP2, (int32)mP3, (int32)mP4, (void *)mP5);
-      break;
-    case action_npp_print:
-      pluginNPPFuncs.print((NPP)mP1, (NPPrint*)mP2);
-      break;
-    case action_npp_handle_event:
-      pluginNPPFuncs.event((NPP)mP1, (void *)mP2);
-      break;
-    case action_npp_url_notify:
-      pluginNPPFuncs.urlnotify((NPP)mP1, (const char*)mP2, (NPReason)mP3, (void*)mP4);
-      break;
-    case action_npp_get_java_class:
-      // Deprecated action
-      break;
-    case action_npp_get_value:
-      pluginNPPFuncs.getvalue((NPP)mP1, (NPPVariable)mP2, (void *)mP3);
-      break;
-    case action_npp_set_value:
-      pluginNPPFuncs.setvalue((NPP)mP1, (NPNVariable)mP2, (void *)mP3);
-      break;
-    default:
-      dbgOut1("Unexpected action!");
-      break;
-  }
-}
-
deleted file mode 100644
--- a/modules/plugin/sdk/samples/npthread/windows/plugin.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef _PLUGIN_H_
-#define _PLUGIN_H_
-
-#include "thread.h"
-#include "action.h"
-
-class nsPluginThread : CThread
-{
-public:
-  nsPluginThread(DWORD aP1);
-  ~nsPluginThread();
-
-private:
-  BOOL init();
-  void shut(); 
-  void dispatch();
-
-public:
-  DWORD callNPP(npapiAction aAction, DWORD aP1=NULL, 
-                DWORD aP2=NULL, DWORD aP3=NULL, DWORD aP4=NULL, 
-                DWORD aP5=NULL, DWORD aP6=NULL, DWORD aP7=NULL);
-
-private:
-  DWORD mP1;
-  DWORD mP2;
-  DWORD mP3;
-  DWORD mP4;
-  DWORD mP5;
-  DWORD mP6;
-  DWORD mP7;
-};
-
-#endif // _PLUGIN_H_
deleted file mode 100644
--- a/modules/plugin/sdk/samples/npthread/windows/plugload.cpp
+++ /dev/null
@@ -1,153 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "windows.h"
-
-DWORD GetPluginsDir(char * path, DWORD maxsize)
-{
-  if(!path)
-    return 0;
-
-  path[0] = '\0';
-
-  DWORD res = GetModuleFileName(NULL, path, maxsize);
-  if(res == 0)
-    return 0;
-
-  if(path[strlen(path) - 1] == '\\')
-    path[lstrlen(path) - 1] = '\0';
-
-  char *p = strrchr(path, '\\');
-
-  if(p)
-    *p = '\0';
-
-  strcat(path, "\\plugins");
-
-  res = strlen(path);
-  return res;
-}
-
-HINSTANCE LoadRealPlugin(char * mimetype)
-{
-  if(!mimetype || !strlen(mimetype))
-    return NULL;
-
-  BOOL bDone = FALSE;
-  WIN32_FIND_DATA ffdataStruct;
-
-  char szPath[_MAX_PATH];
-  char szFileName[_MAX_PATH];
-
-  GetPluginsDir(szPath, _MAX_PATH);
-
-  strcpy(szFileName, szPath);
-  strcat(szFileName, "\\00*");
-
-  HANDLE handle = FindFirstFile(szFileName, &ffdataStruct);
-  if(handle == INVALID_HANDLE_VALUE) {
-    FindClose(handle);
-    return NULL;
-  }
-
-  DWORD versize = 0L;
-  DWORD zero = 0L;
-  char * verbuf = NULL;
-
-  do {
-    strcpy(szFileName, szPath);
-    strcat(szFileName, "\\");
-    strcat(szFileName, ffdataStruct.cFileName);
-    if(!(ffdataStruct. dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) {
-      versize = GetFileVersionInfoSize(szFileName, &zero);
-	    if (versize > 0)
-		    verbuf = new char[versize];
-      else 
-        continue;
-
-      if(!verbuf)
-		    continue;
-
-      GetFileVersionInfo(szFileName, NULL, versize, verbuf);
-
-      char *mimetypes = NULL;
-      UINT len = 0;
-
-      if(!VerQueryValue(verbuf, "\\StringFileInfo\\040904E4\\MIMEType", (void **)&mimetypes, &len)
-         || !mimetypes || !len) {
-        delete [] verbuf;
-        continue;
-      }
-
-      // browse through a string of mimetypes
-      mimetypes[len] = '\0';
-      char * type = mimetypes;
-
-      BOOL more = TRUE;
-      while(more) {
-        char * p = strchr(type, '|');
-        if(p)
-          *p = '\0';
-        else
-          more = FALSE;
-
-        if(0 == stricmp(mimetype, type)) {
-          // this is it!
-          delete [] verbuf;
-          FindClose(handle);
-          HINSTANCE hLib = LoadLibrary(szFileName);
-          return hLib;
-        }
-
-        type = p;
-        type++;
-      }
-
-      delete [] verbuf;
-    }
-
-  } while(FindNextFile(handle, &ffdataStruct));
-
-  FindClose(handle);
-  return NULL;
-}
-
-void UnloadRealPlugin(HINSTANCE hLib)
-{
-  if(!hLib)
-    FreeLibrary(hLib);
-}
deleted file mode 100644
--- a/modules/plugin/sdk/samples/npthread/windows/plugload.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef __PLUGLOAD_H__
-#define __PLUGLOAD_H__
-
-DWORD GetPluginsDir(char * path, DWORD maxsize);
-HINSTANCE LoadRealPlugin(char * mimetype);
-void UnloadRealPlugin(HINSTANCE hLib);
-
-#endif
deleted file mode 100644
--- a/modules/plugin/sdk/samples/npthread/windows/resource.h
+++ /dev/null
@@ -1,15 +0,0 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Developer Studio generated include file.
-// Used by npthread.rc
-//
-
-// Next default values for new objects
-// 
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE        102
-#define _APS_NEXT_COMMAND_VALUE         40001
-#define _APS_NEXT_CONTROL_VALUE         1000
-#define _APS_NEXT_SYMED_VALUE           101
-#endif
-#endif
deleted file mode 100644
--- a/modules/plugin/sdk/samples/npthread/windows/thread.cpp
+++ /dev/null
@@ -1,203 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include <windows.h>
-#include <windowsx.h>
-#include <process.h>
-
-#include "thread.h"
-#include "dbg.h"
-
-static DWORD WINAPI ThreadFunction(void * lp)
-{
-  if (lp == NULL)
-    return 0L;
-
-  CThread * thread = (CThread *)lp;
-  BOOL res = thread->init();
-  thread->setInitEvent();
-
-  if(res)
-    thread->run();
-
-  thread->shut();
-  DWORD ret;
-  GetExitCodeThread(thread->getHandle(), &ret);
-  thread->setShutEvent();
-  return ret;
-}
-
-CThread::CThread(DWORD aInitTimeOut, DWORD aShutTimeOut) :
-  mThread(NULL),
-  mID(0),
-  mState(ts_dead),
-  mEventThreadInitializationFinished(NULL),
-  mEventThreadShutdownFinished(NULL),
-  mInitTimeOut(aInitTimeOut),
-  mShutTimeOut(aShutTimeOut),
-  mEventDo(NULL),
-  mAction(0)
-{
-  dbgOut1("CThread::CThread");
-}
-
-CThread::~CThread()
-{
-  dbgOut1("CThread::~CThread");
-}
-
-BOOL CThread::open(CThread * aThread)
-{
-  dbgOut1("CThread::open");
-
-  mEventThreadInitializationFinished = CreateEvent(NULL, TRUE, FALSE, NULL);
-  mEventThreadShutdownFinished = CreateEvent(NULL, TRUE, FALSE, NULL);
-  mEventDo = CreateEvent(NULL, TRUE, FALSE, NULL);
-
-  mThread = (HANDLE)::_beginthreadex(0, 1024, (UINT (__stdcall *)(void *))ThreadFunction, aThread, 0L, (UINT *)&mID);
-
-  if(mThread == NULL)
-    return FALSE;
-
-  SetThreadPriority(mThread, THREAD_PRIORITY_NORMAL);
-
-  if(mEventThreadInitializationFinished != NULL)
-    WaitForSingleObject(mEventThreadInitializationFinished, mInitTimeOut);
-
-  return TRUE;
-}
-
-void CThread::close(CThread * aThread)
-{
-  switch (mState) {
-    case ts_dead:
-      break;
-    case ts_ready:
-      mState = ts_dead;
-      SetEvent(mEventDo);
-      if(mEventThreadShutdownFinished != NULL)
-        WaitForSingleObject(mEventThreadShutdownFinished, mShutTimeOut);
-      break;
-    case ts_busy:
-    {
-      aThread->shut();
-      DWORD ret;
-      GetExitCodeThread(aThread->getHandle(), &ret);
-      TerminateThread(mThread, ret);
-      mState = ts_dead;
-      break;
-    }
-    default:
-      break;
-  }
-
-  mThread = NULL;
-  CloseHandle(mEventThreadInitializationFinished);
-  CloseHandle(mEventThreadShutdownFinished);
-  CloseHandle(mEventDo);
-  dbgOut1("CThread::close");
-}
-
-BOOL CThread::setInitEvent()
-{
-  return SetEvent(mEventThreadInitializationFinished);
-}
-
-BOOL CThread::setShutEvent()
-{
-  return SetEvent(mEventThreadShutdownFinished);
-}
-
-BOOL CThread::isAlive()
-{
-  return (mThread != NULL);
-}
-
-BOOL CThread::isBusy()
-{
-  return (mState == ts_busy);
-}
-
-HANDLE CThread::getHandle()
-{
-  return mThread;
-}
-
-void CThread::run()
-{
-  mState = ts_ready;
-
-  while(mState != ts_dead) {
-    WaitForSingleObject(mEventDo, INFINITE);
-    //dbgOut2("CThread::run(): Do event signalled, %u", mState);
-    ResetEvent(mEventDo);
-    if(mState == ts_dead)
-      return;
-    mState = ts_busy;
-    dispatch();
-    mState = ts_ready;
-  }
-  mState = ts_dead;
-}
-
-BOOL CThread::tryAction(int aAction)
-{
-  if(mState != ts_ready)
-    return FALSE;
-
-  mAction = aAction;
-  SetEvent(mEventDo);
-
-  return TRUE;
-}
-
-BOOL CThread::doAction(int aAction)
-{
-  while(mState != ts_ready) {
-    //dbgOut2("CThread::doAction %i -- waiting...", aAction);
-    if(mState == ts_dead)
-      return FALSE;
-    Sleep(0);
-  }
-
-  mState = ts_busy;
-  mAction = aAction;
-  //dbgOut2("CThread::doAction -- about to signal %i", aAction);
-  SetEvent(mEventDo);
-
-  return TRUE;
-}
deleted file mode 100644
--- a/modules/plugin/sdk/samples/npthread/windows/thread.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef __THREAD_H__
-#define __THREAD_H__
-
-typedef enum {
-  ts_dead = 0,
-  ts_ready,
-  ts_busy
-
-} ThreadState;
-
-class CThread {
-private:
-  HANDLE mThread;
-  DWORD mID;
-  HANDLE mEventThreadInitializationFinished;
-  HANDLE mEventThreadShutdownFinished;
-  DWORD mInitTimeOut;
-  DWORD mShutTimeOut;
-  HANDLE mEventDo;
-  ThreadState mState;
-
-protected:
-  int mAction;
-
-public:
-  BOOL setInitEvent();
-  BOOL setShutEvent();
-  BOOL isAlive();
-  BOOL isBusy();
-  HANDLE getHandle();
-
-  void run();
-
-  // outside thread interface
-  CThread(DWORD aInitTimeOut = INFINITE, DWORD aShutTimeOut = INFINITE);
-  virtual ~CThread();
-
-  BOOL open(CThread * aThread);
-  void close(CThread * aThread);
-
-  BOOL tryAction(int aAction);
-  BOOL doAction(int aAction);
-
-  // virtuals
-  virtual BOOL init() = 0;
-  virtual void shut() = 0; 
-  virtual void dispatch() = 0;
-};
-
-BOOL InitThreadLib(HINSTANCE aInstance);
-void ShutThreadLib(HINSTANCE aInstance);
-
-#endif // THREAD_HPP__
deleted file mode 100644
--- a/modules/plugin/sdk/samples/unixprinting/Makefile.in
+++ /dev/null
@@ -1,88 +0,0 @@
-# ***** BEGIN LICENSE BLOCK *****
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-# http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Original Code is mozilla.org code.
-#
-# The Initial Developer of the Original Code is
-# Dantifer Dang <dantifer.dang@sun.com>.
-# Portions created by the Initial Developer are Copyright (C) 2004
-# the Initial Developer. All Rights Reserved.
-# 
-# Contributor(s):
-#   Roland Mainz <roland.mainz@nrubsig.org>
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 2 or later (the "GPL"), or
-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# use your version of this file under the terms of the MPL, indicate your
-# decision by deleting the provisions above and replace them with the notice
-# and other provisions required by the GPL or the LGPL. If you do not delete
-# the provisions above, a recipient may use your version of this file under
-# the terms of any one of the MPL, the GPL or the LGPL.
-#
-# ***** END LICENSE BLOCK *****
-
-DEPTH		= ../../../../..
-topsrcdir	= @top_srcdir@
-srcdir		= @srcdir@
-VPATH		= @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-MODULE       = plugin
-LIBRARY_NAME = unixprintplugin
-GRE_MODULE   = 1
-
-
-CSRCS		= \
-		npshell.c \
-		printplugin.c \
-		npunix.c \
-		$(NULL)
-
-# plugins should always be shared, even in the "static" build
-FORCE_SHARED_LIB = 1
-
-# Force use of PIC
-FORCE_USE_PIC	= 1
-
-NO_DIST_INSTALL = 1
-NO_INSTALL = 1
-
-include $(topsrcdir)/config/rules.mk
-
-EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS) $(XT_LIBS) \
-		$(NULL)
-
-EXTRA_DSO_LDOPTS += $(XLDFLAGS) $(XLIBS)
-
-ifeq ($(OS_ARCH), OpenVMS)
-DEFINES		+= -DGENERIC_MOTIF_REDEFINES
-OS_CXXFLAGS	+= -Wc,warn=disa=NOSIMPINT
-endif
-
-install-plugin: $(SHARED_LIBRARY)
-ifdef SHARED_LIBRARY
-	$(INSTALL) $(SHARED_LIBRARY) $(DIST)/bin/plugins
-endif
-
-libs:: install-plugin
-
-ifdef SHARED_LIBRARY
-install:: $(SHARED_LIBRARY)
-	$(SYSINSTALL) $(IFLAGS2) $< $(DESTDIR)$(mozappdir)/plugins 
-endif
-
deleted file mode 100644
--- a/modules/plugin/sdk/samples/unixprinting/npshell.c
+++ /dev/null
@@ -1,392 +0,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Stephen Mak <smak@sun.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/*
- * npshell.c
- *
- * Netscape Client Plugin API
- * - Function that need to be implemented by plugin developers
- *
- * This file defines a "shell" plugin that plugin developers can use
- * as the basis for a real plugin.  This shell just provides empty
- * implementations of all functions that the plugin can implement
- * that will be called by Netscape (the NPP_xxx methods defined in
- * npapi.h).
- *
- * dp Suresh <dp@netscape.com>
- * updated 5/1998 <pollmann@netscape.com>
- * updated 9/2000 <smak@sun.com>
- * updated 3/2004 <dantifer.dang@sun.com>
- *
- */
-
-#include <stdio.h>
-#include <string.h>
-#include "npapi.h"
-#include "printplugin.h"
-#include "strings.h"
-#include "plstr.h"
-
-/***********************************************************************
- *
- * Implementations of plugin API functions
- *
- ***********************************************************************/
-
-char*
-NPP_GetMIMEDescription(void)
-{
-    return(MIME_TYPES_HANDLED);
-}
-
-NPError
-NPP_GetValue(NPP instance, NPPVariable variable, void *value)
-{
-    NPError err = NPERR_NO_ERROR;
-
-    switch (variable) {
-        case NPPVpluginNameString:
-            *((char **)value) = PLUGIN_NAME;
-            break;
-        case NPPVpluginDescriptionString:
-            *((char **)value) = PLUGIN_DESCRIPTION;
-            break;
-        default:
-            err = NPERR_GENERIC_ERROR;
-    }
-    return err;
-}
-
-NPError
-NPP_Initialize(void)
-{
-    return NPERR_NO_ERROR;
-}
-
-void
-NPP_Shutdown(void)
-{
-}
-
-NPError
-NPP_New(NPMIMEType pluginType,
-    NPP instance,
-    uint16_t mode,
-    int16_t argc,
-    char* argn[],
-    char* argv[],
-    NPSavedData* saved)
-{
-
-    PluginInstance* This;
-
-    if (instance == NULL)
-        return NPERR_INVALID_INSTANCE_ERROR;
-
-    instance->pdata = NPN_MemAlloc(sizeof(PluginInstance));
-
-    This = (PluginInstance*) instance->pdata;
-
-    if (This == NULL)
-    {
-        return NPERR_OUT_OF_MEMORY_ERROR;
-    }
-
-    memset(This, 0, sizeof(PluginInstance));
-
-    /* mode is NP_EMBED, NP_FULL, or NP_BACKGROUND (see npapi.h) */
-    This->mode = mode;
-    This->type = dupMimeType(pluginType);
-    This->instance = instance;
-    This->pluginsPrintMessage = NULL;
-    This->exists = false;
-
-    /* Parse argument list passed to plugin instance */
-    /* We are interested in these arguments
-     *  PLUGINSPAGE = <url>
-     */
-    while (argc > 0)
-    {
-        argc --;
-        if (argv[argc] != NULL)
-        {
-        if (!PL_strcasecmp(argn[argc], "PRINTMSG"))
-            This->pluginsPrintMessage = strdup(argv[argc]);
-        else if (!PL_strcasecmp(argn[argc], "HIDDEN"))
-            This->pluginsHidden = (!PL_strcasecmp(argv[argc],
-            "TRUE"));
-        }
-    }
-
-    return NPERR_NO_ERROR;
-}
-
-NPError
-NPP_Destroy(NPP instance, NPSavedData** save)
-{
-
-    PluginInstance* This;
-
-    if (instance == NULL)
-        return NPERR_INVALID_INSTANCE_ERROR;
-
-    This = (PluginInstance*) instance->pdata;
-
-    if (This != NULL) {
-        if (This->type)
-            NPN_MemFree(This->type);
-        if (This->pluginsPrintMessage)
-            NPN_MemFree(This->pluginsPrintMessage);
-        NPN_MemFree(instance->pdata);
-        instance->pdata = NULL;
-    }
-
-    return NPERR_NO_ERROR;
-}
-
-
-NPError
-NPP_SetWindow(NPP instance, NPWindow* window)
-{
-    PluginInstance* This;
-    NPSetWindowCallbackStruct *ws_info;
-
-    if (instance == NULL)
-        return NPERR_INVALID_INSTANCE_ERROR;
-
-    This = (PluginInstance*) instance->pdata;
-
-    if (This == NULL)
-        return NPERR_INVALID_INSTANCE_ERROR;
-
-    ws_info = (NPSetWindowCallbackStruct *)window->ws_info;
-
-#ifdef MOZ_X11
-    if (This->window == (Window) window->window) {
-        /* The page with the plugin is being resized.
-           Save any UI information because the next time
-           around expect a SetWindow with a new window
-           id.
-        */
-#ifdef DEBUG
-        fprintf(stderr, "Printplugin: plugin received window resize.\n");
-        fprintf(stderr, "Window=(%i)\n", (int)window);
-        if (window) {
-           fprintf(stderr, "W=(%i) H=(%i)\n",
-               (int)window->width, (int)window->height);
-        }
-#endif
-        return NPERR_NO_ERROR;
-    } else {
-
-      This->window = (Window) window->window;
-      This->x = window->x;
-      This->y = window->y;
-      This->width = window->width;
-      This->height = window->height;
-      This->display = ws_info->display;
-      This->visual = ws_info->visual;
-      This->depth = ws_info->depth;
-      This->colormap = ws_info->colormap;
-      printScreenMessage(This);
-    }
-#endif  /* #ifdef MOZ_X11 */
-
-    return NPERR_NO_ERROR;
-}
-
-
-NPError
-NPP_NewStream(NPP instance,
-          NPMIMEType type,
-          NPStream *stream,
-          NPBool seekable,
-          uint16_t *stype)
-{
-    if (instance == NULL)
-        return NPERR_INVALID_INSTANCE_ERROR;
-
-    return NPERR_NO_ERROR;
-}
-
-
-int32_t
-NPP_WriteReady(NPP instance, NPStream *stream)
-{
-    if (instance == NULL)
-        return NPERR_INVALID_INSTANCE_ERROR;
-
-    /* We don't want any data, kill the stream */
-    NPN_DestroyStream(instance, stream, NPRES_DONE);
-
-    /* Number of bytes ready to accept in NPP_Write() */
-    return -1L;   /* don't accept any bytes in NPP_Write() */
-}
-
-
-int32_t
-NPP_Write(NPP instance, NPStream *stream, int32_t offset, int32_t len, void *buffer)
-{
-    if (instance == NULL)
-        return NPERR_INVALID_INSTANCE_ERROR;
-
-    /* We don't want any data, kill the stream */
-    NPN_DestroyStream(instance, stream, NPRES_DONE);
-
-    return -1L;   /* don't accept any bytes in NPP_Write() */
-}
-
-
-NPError
-NPP_DestroyStream(NPP instance, NPStream *stream, NPError reason)
-{
-    if (instance == NULL)
-        return NPERR_INVALID_INSTANCE_ERROR;
-
-    /***** Insert NPP_DestroyStream code here *****\
-    PluginInstance* This;
-    This = (PluginInstance*) instance->pdata;
-    \**********************************************/
-
-    return NPERR_NO_ERROR;
-}
-
-
-void
-NPP_StreamAsFile(NPP instance, NPStream *stream, const char* fname)
-{
-    /***** Insert NPP_StreamAsFile code here *****\
-    PluginInstance* This;
-    if (instance != NULL)
-        This = (PluginInstance*) instance->pdata;
-    \*********************************************/
-}
-
-
-void
-NPP_URLNotify(NPP instance, const char* url,
-                NPReason reason, void* notifyData)
-{
-    /***** Insert NPP_URLNotify code here *****\
-    PluginInstance* This;
-    if (instance != NULL)
-        This = (PluginInstance*) instance->pdata;
-    \*********************************************/
-}
-
-
-void
-NPP_Print(NPP instance, NPPrint* printInfo)
-{
-    if(printInfo == NULL)
-        return;
-
-    if (instance != NULL) {
-    /***** Insert NPP_Print code here *****\
-        PluginInstance* This = (PluginInstance*) instance->pdata;
-    \**************************************/
-
-        if (printInfo->mode == NP_FULL) {
-            /*
-             * PLUGIN DEVELOPERS:
-             *  If your plugin would like to take over
-             *  printing completely when it is in full-screen mode,
-             *  set printInfo->pluginPrinted to TRUE and print your
-             *  plugin as you see fit.  If your plugin wants Netscape
-             *  to handle printing in this case, set
-             *  printInfo->pluginPrinted to false (the default) and
-             *  do nothing.  If you do want to handle printing
-             *  yourself, printOne is true if the print button
-             *  (as opposed to the print menu) was clicked.
-             *  On the Macintosh, platformPrint is a THPrint; on
-             *  Windows, platformPrint is a structure
-             *  (defined in npapi.h) containing the printer name, port,
-             *  etc.
-             */
-
-    /***** Insert NPP_Print code here *****\
-            void* platformPrint =
-                printInfo->print.fullPrint.platformPrint;
-            NPBool printOne =
-                printInfo->print.fullPrint.printOne;
-    \**************************************/
-
-            /* Do the default*/
-            printInfo->print.fullPrint.pluginPrinted = false;
-        }
-        else {  /* If not fullscreen, we must be embedded */
-            /*
-             * PLUGIN DEVELOPERS:
-             *  If your plugin is embedded, or is full-screen
-             *  but you returned false in pluginPrinted above, NPP_Print
-             *  will be called with mode == NP_EMBED.  The NPWindow
-             *  in the printInfo gives the location and dimensions of
-             *  the embedded plugin on the printed page.  On the
-             *  Macintosh, platformPrint is the printer port; on
-             *  Windows, platformPrint is the handle to the printing
-             *  device context.
-             */
-
-    /***** Insert NPP_Print code here *****\
-            NPWindow* printWindow =
-                &(printInfo->print.embedPrint.window);
-            void* platformPrint =
-                printInfo->print.embedPrint.platformPrint;
-    \**************************************/
-            PluginInstance* This;
-            NPPrintCallbackStruct* platformPrint;
-            FILE *output;
-
-            platformPrint =
-                (NPPrintCallbackStruct *)(printInfo->print.embedPrint.platformPrint);
-
-            output = (FILE*)(platformPrint->fp);
-            if (output == NULL)
-                return;
-
-            
-            This =  (PluginInstance*) instance->pdata;
-            if (This == NULL)
-                return;
-
-            printEPSMessage(This, output, printInfo->print.embedPrint.window);
-
-        }
-    }
-}
deleted file mode 100644
--- a/modules/plugin/sdk/samples/unixprinting/npunix.c
+++ /dev/null
@@ -1,489 +0,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Stephen Mak <smak@sun.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of the GNU General Public License Version 2 or later (the "GPL"),
- * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/*
- * npunix.c
- *
- * Netscape Client Plugin API
- * - Wrapper function to interface with the Netscape Navigator
- *
- * dp Suresh <dp@netscape.com>
- *
- *----------------------------------------------------------------------
- * PLUGIN DEVELOPERS:
- *  YOU WILL NOT NEED TO EDIT THIS FILE.
- *----------------------------------------------------------------------
- */
-
-#define XP_UNIX 1
-
-#include <stdio.h>
-#include "npapi.h"
-#include "npfunctions.h"
-
-/*
- * Define PLUGIN_TRACE to have the wrapper functions print
- * messages to stderr whenever they are called.
- */
-
-#ifdef PLUGIN_TRACE
-#include <stdio.h>
-#define PLUGINDEBUGSTR(msg) fprintf(stderr, "%s\n", msg)
-#else
-#define PLUGINDEBUGSTR(msg)
-#endif
-
-
-/***********************************************************************
- *
- * Globals
- *
- ***********************************************************************/
-
-static NPNetscapeFuncs   gNetscapeFuncs;    /* Netscape Function table */
-
-
-/***********************************************************************
- *
- * Wrapper functions : plugin calling Netscape Navigator
- *
- * These functions let the plugin developer just call the APIs
- * as documented and defined in npapi.h.
- *
- ***********************************************************************/
-
-void
-NPN_Version(int* plugin_major, int* plugin_minor,
-         int* netscape_major, int* netscape_minor)
-{
-    *plugin_major = NP_VERSION_MAJOR;
-    *plugin_minor = NP_VERSION_MINOR;
-
-    /* Major version is in high byte */
-    *netscape_major = gNetscapeFuncs.version >> 8;
-    /* Minor version is in low byte */
-    *netscape_minor = gNetscapeFuncs.version & 0xFF;
-}
-
-NPError
-NPN_GetValue(NPP instance, NPNVariable variable, void *r_value)
-{
-    return (*gNetscapeFuncs.getvalue)(instance, variable, r_value);
-}
-
-NPError
-NPN_SetValue(NPP instance, NPPVariable variable, void *value)
-{
-    return (*gNetscapeFuncs.setvalue)(instance, variable, value);
-}
-
-NPError
-NPN_GetURL(NPP instance, const char* url, const char* window)
-{
-    return (*gNetscapeFuncs.geturl)(instance, url, window);
-}
-
-NPError
-NPN_GetURLNotify(NPP instance, const char* url, const char* window, void* notifyData)
-{
-    return (*gNetscapeFuncs.geturlnotify)(instance, url, window, notifyData);
-}
-
-NPError
-NPN_PostURL(NPP instance, const char* url, const char* window,
-         uint32_t len, const char* buf, NPBool file)
-{
-    return (*gNetscapeFuncs.posturl)(instance, url, window, len, buf, file);
-}
-
-NPError
-NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32_t len,
-                  const char* buf, NPBool file, void* notifyData)
-{
-    return (*gNetscapeFuncs.posturlnotify)(instance, url, window, len, buf, file, notifyData);
-}
-
-NPError
-NPN_RequestRead(NPStream* stream, NPByteRange* rangeList)
-{
-    return (*gNetscapeFuncs.requestread)(stream, rangeList);
-}
-
-NPError
-NPN_NewStream(NPP instance, NPMIMEType type, const char *window,
-          NPStream** stream_ptr)
-{
-    return (*gNetscapeFuncs.newstream)(instance, type, window, stream_ptr);
-}
-
-int32_t
-NPN_Write(NPP instance, NPStream* stream, int32_t len, void* buffer)
-{
-    return (*gNetscapeFuncs.write)(instance, stream, len, buffer);
-}
-
-NPError
-NPN_DestroyStream(NPP instance, NPStream* stream, NPError reason)
-{
-    return (*gNetscapeFuncs.destroystream)(instance, stream, reason);
-}
-
-void
-NPN_Status(NPP instance, const char* message)
-{
-    (*gNetscapeFuncs.status)(instance, message);
-}
-
-const char*
-NPN_UserAgent(NPP instance)
-{
-    return (*gNetscapeFuncs.uagent)(instance);
-}
-
-void*
-NPN_MemAlloc(uint32_t size)
-{
-    return (*gNetscapeFuncs.memalloc)(size);
-}
-
-void NPN_MemFree(void* ptr)
-{
-    (*gNetscapeFuncs.memfree)(ptr);
-}
-
-uint32_t NPN_MemFlush(uint32_t size)
-{
-    return (*gNetscapeFuncs.memflush)(size);
-}
-
-void NPN_ReloadPlugins(NPBool reloadPages)
-{
-    (*gNetscapeFuncs.reloadplugins)(reloadPages);
-}
-
-void
-NPN_InvalidateRect(NPP instance, NPRect *invalidRect)
-{
-    (*gNetscapeFuncs.invalidaterect)(instance, invalidRect);
-}
-
-void
-NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion)
-{
-    (*gNetscapeFuncs.invalidateregion)(instance, invalidRegion);
-}
-
-void
-NPN_ForceRedraw(NPP instance)
-{
-    (*gNetscapeFuncs.forceredraw)(instance);
-}
-
-void NPN_PushPopupsEnabledState(NPP instance, NPBool enabled)
-{
-    (*gNetscapeFuncs.pushpopupsenabledstate)(instance, enabled);
-}
-
-void NPN_PopPopupsEnabledState(NPP instance)
-{
-    (*gNetscapeFuncs.poppopupsenabledstate)(instance);
-}
-
-
-
-/***********************************************************************
- *
- * Wrapper functions : Netscape Navigator -> plugin
- *
- * These functions let the plugin developer just create the APIs
- * as documented and defined in npapi.h, without needing to 
- * install those functions in the function table or worry about
- * setting up globals for 68K plugins.
- *
- ***********************************************************************/
-
-NPError
-Private_New(NPMIMEType pluginType, NPP instance, uint16_t mode,
-        int16_t argc, char* argn[], char* argv[], NPSavedData* saved)
-{
-    NPError ret;
-    PLUGINDEBUGSTR("New");
-    ret = NPP_New(pluginType, instance, mode, argc, argn, argv, saved);
-    return ret; 
-}
-
-NPError
-Private_Destroy(NPP instance, NPSavedData** save)
-{
-    PLUGINDEBUGSTR("Destroy");
-    return NPP_Destroy(instance, save);
-}
-
-NPError
-Private_SetWindow(NPP instance, NPWindow* window)
-{
-    NPError err;
-    PLUGINDEBUGSTR("SetWindow");
-    err = NPP_SetWindow(instance, window);
-    return err;
-}
-
-NPError
-Private_NewStream(NPP instance, NPMIMEType type, NPStream* stream,
-            NPBool seekable, uint16_t* stype)
-{
-    NPError err;
-    PLUGINDEBUGSTR("NewStream");
-    err = NPP_NewStream(instance, type, stream, seekable, stype);
-    return err;
-}
-
-int32_t
-Private_WriteReady(NPP instance, NPStream* stream)
-{
-    unsigned int result;
-    PLUGINDEBUGSTR("WriteReady");
-    result = NPP_WriteReady(instance, stream);
-    return result;
-}
-
-int32_t
-Private_Write(NPP instance, NPStream* stream, int32_t offset, int32_t len,
-        void* buffer)
-{
-    unsigned int result;
-    PLUGINDEBUGSTR("Write");
-    result = NPP_Write(instance, stream, offset, len, buffer);
-    return result;
-}
-
-void
-Private_StreamAsFile(NPP instance, NPStream* stream, const char* fname)
-{
-    PLUGINDEBUGSTR("StreamAsFile");
-    NPP_StreamAsFile(instance, stream, fname);
-}
-
-
-NPError
-Private_DestroyStream(NPP instance, NPStream* stream, NPError reason)
-{
-    NPError err;
-    PLUGINDEBUGSTR("DestroyStream");
-    err = NPP_DestroyStream(instance, stream, reason);
-    return err;
-}
-
-void
-Private_URLNotify(NPP instance, const char* url,
-                NPReason reason, void* notifyData)
-                
-{
-    PLUGINDEBUGSTR("URLNotify");
-    NPP_URLNotify(instance, url, reason, notifyData);
-}
-
-
-
-void
-Private_Print(NPP instance, NPPrint* platformPrint)
-{
-    PLUGINDEBUGSTR("Print");
-    NPP_Print(instance, platformPrint);
-}
-
-/*********************************************************************** 
- *
- * These functions are located automagically by netscape.
- *
- ***********************************************************************/
-
-/*
- * NP_GetPluginVersion [optional]
- *  - The browser uses the return value to indicate to the user what version of
- *    this plugin is installed.
- */
-char *
-NP_GetPluginVersion(void)
-{
-    return "1.0.0";
-}
-
-/*
- * NP_GetMIMEDescription
- *  - Netscape needs to know about this symbol
- *  - Netscape uses the return value to identify when an object instance
- *    of this plugin should be created.
- */
-char *
-NP_GetMIMEDescription(void)
-{
-    return NPP_GetMIMEDescription();
-}
-
-/*
- * NP_GetValue [optional]
- *  - Netscape needs to know about this symbol.
- *  - Interfaces with plugin to get values for predefined variables
- *    that the navigator needs.
- */
-NPError
-NP_GetValue(void* future, NPPVariable variable, void *value)
-{
-    return NPP_GetValue(future, variable, value);
-}
-
-/*
- * NP_Initialize
- *  - Netscape needs to know about this symbol.
- *  - It calls this function after looking up its symbol before it
- *    is about to create the first ever object of this kind.
- *
- * PARAMETERS
- *    nsTable   - The netscape function table. If developers just use these
- *        wrappers, they don't need to worry about all these function
- *        tables.
- * RETURN
- *    pluginFuncs
- *      - This functions needs to fill the plugin function table
- *        pluginFuncs and return it. Netscape Navigator plugin
- *        library will use this function table to call the plugin.
- *
- */
-NPError
-NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs)
-{
-    NPError err = NPERR_NO_ERROR;
-
-    PLUGINDEBUGSTR("NP_Initialize");
-    
-    /* validate input parameters */
-
-    if ((nsTable == NULL) || (pluginFuncs == NULL))
-        err = NPERR_INVALID_FUNCTABLE_ERROR;
-    
-    /*
-     * Check the major version passed in Netscape's function table.
-     * We won't load if the major version is newer than what we expect.
-     * Also check that the function tables passed in are big enough for
-     * all the functions we need (they could be bigger, if Netscape added
-     * new APIs, but that's OK with us -- we'll just ignore them).
-     *
-     */
-
-    if (err == NPERR_NO_ERROR) {
-        if ((nsTable->version >> 8) > NP_VERSION_MAJOR)
-            err = NPERR_INCOMPATIBLE_VERSION_ERROR;
-        if (nsTable->size < sizeof(NPNetscapeFuncs))
-            err = NPERR_INVALID_FUNCTABLE_ERROR;
-        if (pluginFuncs->size < sizeof(NPPluginFuncs))      
-            err = NPERR_INVALID_FUNCTABLE_ERROR;
-    }
-        
-    
-    if (err == NPERR_NO_ERROR) {
-        /*
-         * Copy all the fields of Netscape function table into our
-         * copy so we can call back into Netscape later.  Note that
-         * we need to copy the fields one by one, rather than assigning
-         * the whole structure, because the Netscape function table
-         * could actually be bigger than what we expect.
-         */
-        gNetscapeFuncs.version       = nsTable->version;
-        gNetscapeFuncs.size          = nsTable->size;
-        gNetscapeFuncs.posturl       = nsTable->posturl;
-        gNetscapeFuncs.geturl        = nsTable->geturl;
-        gNetscapeFuncs.geturlnotify  = nsTable->geturlnotify;
-        gNetscapeFuncs.requestread   = nsTable->requestread;
-        gNetscapeFuncs.newstream     = nsTable->newstream;
-        gNetscapeFuncs.write         = nsTable->write;
-        gNetscapeFuncs.destroystream = nsTable->destroystream;
-        gNetscapeFuncs.status        = nsTable->status;
-        gNetscapeFuncs.uagent        = nsTable->uagent;
-        gNetscapeFuncs.memalloc      = nsTable->memalloc;
-        gNetscapeFuncs.memfree       = nsTable->memfree;
-        gNetscapeFuncs.memflush      = nsTable->memflush;
-        gNetscapeFuncs.reloadplugins = nsTable->reloadplugins;
-        gNetscapeFuncs.getJavaEnv    = NULL;
-        gNetscapeFuncs.getJavaPeer   = NULL;
-        gNetscapeFuncs.getvalue      = nsTable->getvalue;
-        gNetscapeFuncs.pushpopupsenabledstate = nsTable->pushpopupsenabledstate;
-        gNetscapeFuncs.poppopupsenabledstate  = nsTable->poppopupsenabledstate;
-
-        /*
-         * Set up the plugin function table that Netscape will use to
-         * call us.  Netscape needs to know about our version and size
-         * and have a UniversalProcPointer for every function we
-         * implement.
-         */
-        pluginFuncs->version    = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR;
-        pluginFuncs->size       = sizeof(NPPluginFuncs);
-        pluginFuncs->newp       = (NPP_NewProcPtr)(Private_New);
-        pluginFuncs->destroy    = (NPP_DestroyProcPtr)(Private_Destroy);
-        pluginFuncs->setwindow  = (NPP_SetWindowProcPtr)(Private_SetWindow);
-        pluginFuncs->newstream  = (NPP_NewStreamProcPtr)(Private_NewStream);
-        pluginFuncs->destroystream = (NPP_DestroyStreamProcPtr)(Private_DestroyStream);
-        pluginFuncs->asfile     = (NPP_StreamAsFileProcPtr)(Private_StreamAsFile);
-        pluginFuncs->writeready = (NPP_WriteReadyProcPtr)(Private_WriteReady);
-        pluginFuncs->write      = (NPP_WriteProcPtr)(Private_Write);
-        pluginFuncs->print      = (NPP_PrintProcPtr)(Private_Print);
-        pluginFuncs->urlnotify  = (NPP_URLNotifyProcPtr)(Private_URLNotify);
-        pluginFuncs->event      = NULL;
-        pluginFuncs->javaClass  = NULL;
-
-        err = NPP_Initialize();
-    }
-    
-    return err;
-}
-
-/*
- * NP_Shutdown [optional]
- *  - Netscape needs to know about this symbol.
- *  - It calls this function after looking up its symbol after
- *    the last object of this kind has been destroyed.
- *
- */
-NPError
-NP_Shutdown(void)
-{
-    PLUGINDEBUGSTR("NP_Shutdown");
-    NPP_Shutdown();
-    return NPERR_NO_ERROR;
-}
deleted file mode 100644
--- a/modules/plugin/sdk/samples/unixprinting/printplugin.c
+++ /dev/null
@@ -1,188 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Dantifer Dang <dantifer.dang@sun.com>.
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Roland Mainz <roland.mainz@nrubsig.org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/* Xlib/Xt stuff */
-#ifdef MOZ_X11
-#include <X11/Xlib.h>
-#include <X11/Intrinsic.h>
-#include <X11/cursorfont.h>
-#endif /* MOZ_X11 */
-
-#include "npapi.h"
-#include "printplugin.h"
-#include "prprf.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-
-/* MIMETypeList maintenance routines */
-NPMIMEType
-dupMimeType(NPMIMEType type)
-{
-    NPMIMEType mimetype = NPN_MemAlloc(strlen(type)+1);
-    if (mimetype)
-        strcpy(mimetype, type);
-    return mimetype;
-}
-
-static void
-privatePrintScreenMessage(PluginInstance *This)
-{
-#ifdef MOZ_X11
-    GC gc;
-    unsigned int h,w;
-    int x,y,l;
-    const char *string;
-    gc = XCreateGC(This->display, This->window, 0, NULL);
-
-    /* draw a rectangle */
-    h = This->height/2;
-    w = 3 * This->width/4;
-    x = (This->width - w)/2; /* center */
-    y = h/2;
-    XDrawRectangle(This->display, This->window, gc, x, y, w, h);
-
-    /* draw a string */
-    string = This->pluginsPrintMessage;
-    if (string && *string)
-    {
-        l = strlen(string);
-        x += This->width/10;
-        XDrawString(This->display, This->window, gc, x, This->height/2, string, l);
-    }
-    XFreeGC(This->display, gc);
-#endif /* MOZ_X11 */
-}
-
-static void
-setCursor (PluginInstance *This)
-{
-#ifdef MOZ_X11
-    static Cursor nullPluginCursor = None;
-    if (!nullPluginCursor)
-    {
-        nullPluginCursor = XCreateFontCursor(This->display, XC_hand2);
-    }
-    if (nullPluginCursor)
-    {
-        XDefineCursor(This->display, This->window, nullPluginCursor);
-    }
-#endif /* MOZ_X11 */
-}
-
-#ifdef MOZ_X11
-static void
-xt_event_handler(Widget xt_w, PluginInstance *This, XEvent *xevent, Boolean *b)
-{
-    switch (xevent->type)
-    {
-        case Expose:
-            /* get rid of all other exposure events */
-            do {} while (XCheckTypedWindowEvent(This->display, This->window,
-                                                Expose, xevent));
-            privatePrintScreenMessage(This);
-            break;
-        case ButtonRelease:
-            break;
-        default:
-            break;
-    }
-}
-#endif /* MOZ_X11 */
-
-static void
-addXtEventHandler(PluginInstance *This)
-{
-#ifdef MOZ_X11
-     Display *dpy = (Display*) This->display;
-     Window xwin = (Window) This->window;
-     Widget xt_w = XtWindowToWidget(dpy, xwin);
-     if (xt_w)
-     {
-         long event_mask = ExposureMask | ButtonReleaseMask | ButtonPressMask;
-         XSelectInput(dpy, xwin, event_mask);
-         XtAddEventHandler(xt_w, event_mask, False, (XtEventHandler)xt_event_handler, This);
-     }
-#endif /* MOZ_X11 */
-}
-
-void printScreenMessage(PluginInstance *This)
-{
-    privatePrintScreenMessage(This);
-    setCursor(This);
-    addXtEventHandler(This);
-}
-
-
-void printEPSMessage(PluginInstance *This, FILE *output, NPWindow window)
-{
-    char *string;
-    int x,y,h,w;
-    
-    if (!output)
-      return;
-
-    fprintf(output, "%%!PS-Adobe-3.0 EPSF-3.0\n");
-    fprintf(output, "%%%%BoundingBox: 0 0 %d %d\n", window.width, window.height);
-    fprintf(output, "%%%%EndComments\n");
-    fprintf(output, "gsave\n");
-
-    w = 3 * window.width  / 4;
-    h =     window.height / 2;
-    x = (window.width - w)/2; /* center */
-    y = h/2;
-
-    /* draw a rectangle */
-    fprintf(output, "newpath\n");
-    fprintf(output, "%d %d moveto 0 %d rlineto %d 0 rlineto 0 %d rlineto\n",
-            x, y, h, w, -h);
-    fprintf(output, "closepath\n");
-    fprintf(output, "stroke\n");
-
-    /* draw a string */
-    string = This->pluginsPrintMessage;
-    if (string && *string)
-    {
-        fprintf(output, "/Times-Roman findfont 300 scalefont setfont\n");
-        fprintf(output, "%d %d moveto\n", x + window.width/10, window.height / 2);
-        fprintf(output, "(%s) show\n",string);
-    }
-
-    fprintf(output,"grestore\n");
-    fprintf(output,"%%%%EOF\n");
-}
-
deleted file mode 100644
--- a/modules/plugin/sdk/samples/unixprinting/printplugin.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Dantifer Dang <dantifer.dang@sun.com>.
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Roland Mainz <roland.mainz@nrubsig.org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-
-#ifndef UNIXPRINTING_SAMPLEPLUGIN_H
-#define UNIXPRINTING_SAMPLEPLUGIN_H 1
-
-#define MIME_TYPES_HANDLED "application/x-print-unix-nsplugin:.pnt:Demo Print Plugin for Unix/Linux"
-#define PLUGIN_NAME         "Demo Print Plugin for unix/linux"
-#define PLUGIN_DESCRIPTION   "The demo print plugin for unix."
-
-typedef struct _PluginInstance
-{
-    uint16_t     mode;
-#ifdef MOZ_X11
-    Window       window;
-    Display     *display;
-#endif /* MOZ_X11 */
-    uint32_t     x,
-                 y;
-    uint32_t     width,
-                 height;
-    NPMIMEType   type;
-    char        *message;
-
-    NPP          instance;
-    char        *pluginsPrintMessage;
-    NPBool       pluginsHidden;
-#ifdef MOZ_X11
-    Visual      *visual;
-    Colormap     colormap;
-#endif /* MOZ_X11 */
-    unsigned int depth;
-
-    NPBool       exists;  /* Does the widget already exist? */
-} PluginInstance;
-
-
-/* Extern functions */
-extern NPMIMEType dupMimeType(NPMIMEType type);
-extern void printScreenMessage(PluginInstance *This);
-extern void printEPSMessage(PluginInstance *This, FILE *output, NPWindow window);
-
-#endif /* !UNIXPRINTING_SAMPLEPLUGIN_H */
-
deleted file mode 100644
--- a/modules/plugin/sdk/samples/unixprinting/readme.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-unixprinting plugin
-
-Sample plugin for plugin printing.
deleted file mode 100644
--- a/modules/plugin/sdk/samples/unixprinting/unixprintplugin_test1.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-  <head>
-    <title>Print plugin Embed Test #1</title>
-  </head>
-    <body>
-    <center>
-      <h1>Demo Print Plugin for Unix/Linux #1</h1>
-      <table align="center" border="1">
-        <tbody>
-          <tr><td>Sample test (above plugin)</td></tr>
-          <tr>
-            <td align="center">
-              <embed
-                type="application/x-print-unix-nsplugin"
-                printmsg="printable demo plugin" height="500" width="500">
-              <br>
-            </td>
-          </tr>
-          <tr><td>Sample test (below plugin)</td></tr>
-        </tbody>
-      </table>
-      <br>
-      for test purpose only
-      <br>
-    </center>
-  </body>
-</html>
deleted file mode 100644
--- a/modules/plugin/sdk/samples/unixprinting/unixprintplugin_test2.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-  <head>
-    <title>Print plugin Embed Test #2</title>
-  </head>
-    <body>
-    <center>
-      <h1>Demo Print Plugin for Unix/Linux #2</h1>
-      <table align="center" border="1">
-        <tbody>
-          <tr><td>Sample test (above plugins)</td></tr>
-          <tr>
-            <td align="center">
-              <embed
-                type="application/x-print-unix-nsplugin"
-                printmsg="printable demo plugin 1" height="220" width="220">
-              <br>
-            </td>
-            <td align="center">
-              <embed
-                type="application/x-print-unix-nsplugin"
-                printmsg="printable demo plugin 2" height="220" width="220">
-              <br>
-            </td>
-          </tr>
-          <tr>
-            <td align="center">
-              <embed
-                type="application/x-print-unix-nsplugin"
-                printmsg="printable demo plugin 3" height="220" width="220">
-              <br>
-            </td>
-            <td align="center">
-              <embed
-                type="application/x-print-unix-nsplugin"
-                printmsg="printable demo plugin 4" height="220" width="220">
-              <br>
-            </td>
-          </tr>
-          <tr><td>Sample test (below plugins)</td></tr>
-        </tbody>
-      </table>
-      <br>
-      for test purpose only
-      <br>
-    </center>
-  </body>
-</html>
deleted file mode 100644
--- a/modules/plugin/sdk/samples/winless/readme.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-Winless Plugin
-
-This is a windowless plugin sample.
deleted file mode 100644
--- a/modules/plugin/sdk/samples/winless/test.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<html>
-<body>
-
-<center><h1>Windowless Plugin Example for Mozilla Test Case</h1></center>
-
-This test case is to demonstrate the Windowless Plugin example.
-<br><br>
-
-<center>
-
-<embed type="application/winless-plugin" width=200 height=150>
-
-</center>
-
-</html>
-</body>
\ No newline at end of file
deleted file mode 100644
--- a/modules/plugin/sdk/samples/winless/windows/Makefile.in
+++ /dev/null
@@ -1,64 +0,0 @@
-#
-# ***** BEGIN LICENSE BLOCK *****
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-# http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Original Code is mozilla.org code.
-#
-# The Initial Developer of the Original Code is
-# Netscape Communications Corporation.
-# Portions created by the Initial Developer are Copyright (C) 1998
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 2 or later (the "GPL"), or
-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# use your version of this file under the terms of the MPL, indicate your
-# decision by deleting the provisions above and replace them with the notice
-# and other provisions required by the GPL or the LGPL. If you do not delete
-# the provisions above, a recipient may use your version of this file under
-# the terms of any one of the MPL, the GPL or the LGPL.
-#
-# ***** END LICENSE BLOCK *****
-
-DEPTH = ../../../../../..
-topsrcdir = @top_srcdir@
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-XPIDL_MODULE = npwinless
-LIBRARY_NAME = npwinless
-
-NO_DIST_INSTALL = 1
-
-
-CPPSRCS = plugin.cpp
-
-SHARED_LIBRARY_LIBS = ../../common/$(LIB_PREFIX)plugingate_s.$(LIB_SUFFIX)
-
-DEFFILE = $(win_srcdir)/npwinless.def
-RESFILE = npwinless.res
-
-include $(topsrcdir)/config/rules.mk
-
-DEFINES += -DMOZILLA_STRICT_API
-
-LOCAL_INCLUDES = -I$(srcdir)/../../include \
-                 -I$(srcdir)/../../../include \
-                 $(NULL)
deleted file mode 100644
--- a/modules/plugin/sdk/samples/winless/windows/npwinless.def
+++ /dev/null
@@ -1,6 +0,0 @@
-LIBRARY   NPWINLESS
-
-EXPORTS
-	NP_GetEntryPoints   @1
-	NP_Initialize       @2
-	NP_Shutdown         @3
deleted file mode 100644
--- a/modules/plugin/sdk/samples/winless/windows/npwinless.dsp
+++ /dev/null
@@ -1,135 +0,0 @@
-# Microsoft Developer Studio Project File - Name="npwinless" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=npwinless - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "npwinless.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "npwinless.mak" CFG="npwinless - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "npwinless - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "npwinless - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "npwinless - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NPWINLESS_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\include" /I "..\..\..\include" /D "NDEBUG" /D "MOZILLA_STRICT_API" /D "XP_WIN" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NPWINLESS_EXPORTS" /YX /FD /c
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib /nologo /dll /machine:I386
-
-!ELSEIF  "$(CFG)" == "npwinless - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NPWINLESS_EXPORTS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\include" /I "..\..\..\include" /D "_DEBUG" /D "MOZILLA_STRICT_API" /D "XP_WIN" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NPWINLESS_EXPORTS" /YX /FD /GZ /c
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-
-!ENDIF 
-
-# Begin Target
-
-# Name "npwinless - Win32 Release"
-# Name "npwinless - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\common\np_entry.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\common\npn_gate.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\common\npp_gate.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\npwinless.def
-# End Source File
-# Begin Source File
-
-SOURCE=.\npwinless.rc
-# End Source File
-# Begin Source File
-
-SOURCE=.\plugin.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\plugin.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\include\pluginbase.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
deleted file mode 100644
--- a/modules/plugin/sdk/samples/winless/windows/npwinless.dsw
+++ /dev/null
@@ -1,29 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "npwinless"=.\npwinless.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
deleted file mode 100644
--- a/modules/plugin/sdk/samples/winless/windows/npwinless.rc
+++ /dev/null
@@ -1,112 +0,0 @@
-//Microsoft Developer Studio generated resource script.
-//
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include "winresrc.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
-
-#ifndef _MAC
-/////////////////////////////////////////////////////////////////////////////
-//
-// Version
-//
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,0,0,1
- PRODUCTVERSION 1,0,0,1
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x40004L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
-    BLOCK "StringFileInfo"
-    BEGIN
-        BLOCK "040904e4"
-        BEGIN
-            VALUE "Comments", "\0"
-            VALUE "CompanyName", " \0"
-            VALUE "FileDescription", "npwinless\0"
-            VALUE "FileExtents", "bic\0"
-            VALUE "FileOpenName", "npwinless\0"
-            VALUE "FileVersion", "1, 0, 0, 1\0"
-            VALUE "InternalName", "npwinless\0"
-            VALUE "LegalCopyright", "Copyright  2001\0"
-            VALUE "LegalTrademarks", "\0"
-            VALUE "MIMEType", "application/winless-plugin\0"
-            VALUE "OriginalFilename", "npwinless.dll\0"
-            VALUE "PrivateBuild", "\0"
-            VALUE "ProductName", "Windowless Example Plugin for Mozilla\0"
-            VALUE "ProductVersion", "1, 0, 0, 1\0"
-            VALUE "SpecialBuild", "\0"
-        END
-    END
-    BLOCK "VarFileInfo"
-    BEGIN
-        VALUE "Translation", 0x409, 1252
-    END
-END
-
-#endif    // !_MAC
-
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE DISCARDABLE 
-BEGIN
-    "resource.h\0"
-END
-
-2 TEXTINCLUDE DISCARDABLE 
-BEGIN
-    "#include ""winresrc.h""\r\n"
-    "\0"
-END
-
-3 TEXTINCLUDE DISCARDABLE 
-BEGIN
-    "\r\n"
-    "\0"
-END
-
-#endif    // APSTUDIO_INVOKED
-
-#endif    // English (U.S.) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif    // not APSTUDIO_INVOKED
-
deleted file mode 100644
--- a/modules/plugin/sdk/samples/winless/windows/plugin.cpp
+++ /dev/null
@@ -1,151 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-
-#include <windows.h>
-#include <windowsx.h>
-
-#include "plugin.h"
-
-//////////////////////////////////////
-//
-// general initialization and shutdown
-//
-NPError NS_PluginInitialize()
-{
-  return NPERR_NO_ERROR;
-}
-
-void NS_PluginShutdown()
-{
-}
-
-/////////////////////////////////////////////////////////////
-//
-// construction and destruction of our plugin instance object
-//
-nsPluginInstanceBase * NS_NewPluginInstance(nsPluginCreateData * aCreateDataStruct)
-{
-  if(!aCreateDataStruct)
-    return NULL;
-
-  nsPluginInstance * plugin = new nsPluginInstance(aCreateDataStruct->instance);
-
-  // now is the time to tell Mozilla that we are windowless
-  NPN_SetValue(aCreateDataStruct->instance, NPPVpluginWindowBool, NULL);
-
-  return plugin;
-}
-
-void NS_DestroyPluginInstance(nsPluginInstanceBase * aPlugin)
-{
-  if(aPlugin)
-    delete (nsPluginInstance *)aPlugin;
-}
-
-////////////////////////////////////////
-//
-// nsPluginInstance class implementation
-//
-nsPluginInstance::nsPluginInstance(NPP aInstance) : nsPluginInstanceBase(),
-  mInstance(aInstance),
-  mInitialized(FALSE)
-{
-}
-
-nsPluginInstance::~nsPluginInstance()
-{
-}
-
-NPBool nsPluginInstance::init(NPWindow* aWindow)
-{
-  // no GUI to init in windowless case
-  mInitialized = TRUE;
-  return TRUE;
-}
-
-void nsPluginInstance::shut()
-{
-  // no GUI to shut in windowless case
-  mInitialized = FALSE;
-}
-
-NPBool nsPluginInstance::isInitialized()
-{
-  return mInitialized;
-}
-
-NPError nsPluginInstance::SetWindow(NPWindow* aWindow)
-{
-  // keep window parameters
-  mWindow = aWindow;
-  return NPERR_NO_ERROR;
-}
-
-uint16_t nsPluginInstance::HandleEvent(void* aEvent)
-{
-  NPEvent * event = (NPEvent *)aEvent;
-  switch (event->event) {
-    case WM_PAINT: 
-    {
-      if(!mWindow)
-        break;
-
-      // get the dirty rectangle to update or repaint the whole window
-      RECT * drc = (RECT *)event->lParam;
-      if(drc)
-        FillRect((HDC)event->wParam, drc, (HBRUSH)(COLOR_ACTIVECAPTION+1));
-      else {
-        RECT rc;
-        rc.bottom = mWindow->y + mWindow->height;
-        rc.left   = mWindow->x;
-        rc.right  = mWindow->x + mWindow->width;
-        rc.top    = mWindow->y;
-        FillRect((HDC)event->wParam, &rc, (HBRUSH)(COLOR_ACTIVECAPTION+1));
-      }
-      break;
-    }
-    case WM_KEYDOWN:
-    {
-      Beep(1000,100);
-      break;
-    }
-    default:
-      return 0;
-  }
-  return 1;
-}
\ No newline at end of file
deleted file mode 100644
--- a/modules/plugin/sdk/samples/winless/windows/plugin.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef __PLUGIN_H__
-#define __PLUGIN_H__
-
-#include "pluginbase.h"
-
-class nsPluginInstance : public nsPluginInstanceBase
-{
-public:
-  nsPluginInstance(NPP aInstance);
-  ~nsPluginInstance();
-
-  NPBool init(NPWindow* aWindow);
-  void shut();
-  NPBool isInitialized();
-
-  NPError SetWindow(NPWindow* aWindow);
-  uint16_t HandleEvent(void* aEvent);
-
-private:
-  NPP mInstance;
-  NPBool mInitialized;
-  NPWindow * mWindow;
-};
-
-#endif // __PLUGIN_H__
deleted file mode 100644
--- a/modules/plugin/sdk/samples/winless/windows/resource.h
+++ /dev/null
@@ -1,20 +0,0 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Developer Studio generated include file.
-// Used by npwinless.rc
-//
-#define IDD_MAIN                        101
-#define IDC_BUTTON_GO                   1002
-#define IDC_STATIC_UA                   1003
-#define IDC_BUTTON1                     1005
-#define IDC_BUTTON_DONT                 1005
-
-// Next default values for new objects
-// 
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE        102
-#define _APS_NEXT_COMMAND_VALUE         40001
-#define _APS_NEXT_CONTROL_VALUE         1006
-#define _APS_NEXT_SYMED_VALUE           101
-#endif
-#endif