Hi Vijay,

Once you have your code linking with chromium, you have two options for
registering your internal NPAPI plugin.

1. Add an entry to the builtin_plugins array in
webkit/glue/plugins/plugin_list_win.cc PluginList::PlatformInit().

2. Use the following approach that can be called from anywhere once chromium
has been initialized.

A. Include the appropriate header.

#include "webkit/glue/plugins/plugin_list.h"

B. Create an instance of NPAPI::PluginVersionInfo populated with your plugin
information and NP function pointers.

NPAPI::PluginVersionInfo info;

info.path = FilePath(L"my_dummy_path");
info.product_name = L"My Product Name";
info.file_description = L"My Product Description";
info.file_version = L"1, 0, 0, 1";

info.mime_types = L"application/x-my-plugin";
info.file_extensions = L"*";
info.type_descriptions = L"";

info.entry_points.np_getentrypoints = my_np_getentrypoints;
info.entry_points.np_initialize = my_np_initialize;
info.entry_points.np_shutdown = my_np_shutdown;

C. Register the plugin information with the system.

NPAPI::PluginList::RegisterInternalPlugin(info);
NPAPI::PluginList::Singleton()->LoadPlugin(FilePath(info.path));


Finally, to the load plugin in an HTML page you use an embed tag like the
following:

<embed type="application/x-my-plugin" width=600 height=40>


I recommend looking at the chromium embedded framework for a simple NPAPI
plugin example and plugin development environment.

http://code.google.com/p/chromiumembedded


Regards,
Marshall

On Thu, Mar 5, 2009 at 11:59 PM, eager_learner <vijay.sankar.ra...@gmail.com
> wrote:

>
> Hello Plugin Gurus
>
> The following link is very well written and I hope it still holds good
>
> http://sites.google.com/a/chromium.org/dev/developers/design-documents/plugin-architecture
>
> I have some followup questions on plugin development (internal)
>
> 1. Based on the plugin architecture design document, can you point me
> to an existing plugin (flash, shockwave, activeX) code file names? The
> source Navigator project that I have created does not show any
> inheritance of WebPplugin
>
> 2. Again the debugging process seems a little difficult if new
> processes are spawned (one for the browser, one for the renderer and
> one for the plugin). How can we attach Visual Studio to the plugin?
>
> 3. Do plugin writers need to know anything about the class
> PluginInstance? It seems to create the WebPlugin or atleast gets
> passed it and has a reference to it.
>
> Simply put, what needs to be done by plugin developers to develop an
> internal plugin? Does the NPAPI need to know about the PluginInstance?
>
> Perhaps there is a clearer document that explains this.
>
> Thanks
> Vijay
> >
>

--~--~---------~--~----~------------~-------~--~----~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to