Simple working example using plugin writen in Qt and make it work with NPAPI
There's a nice framework called Firebreath for writing cross-platform browser plugins in C++. It comes with plenty of documentation and example projects, so it's easy to get started. As a plus, in addition to NPAPI hosts you pretty much get free support for ActiveX browsers (Internet Explorer) too.
Check out the QtBrowserPlugin solution, http://doc.qt.nokia.com/solutions/4/qtbrowserplugin/developingplugins.html
There you should find information about writing your own NPAPI plugins.
Update:I did not realize there was no useful link to the source, it can be found in gitorious athttp://qt.gitorious.org/qt-solutions/ to browse online http://qt.gitorious.org/qt-solutions/qt-solutions/trees/master/qtbrowserplugin