Hi All,

The context for this conversation is the chromium-based embedded browser
control described in a previous thread:
http://groups.google.com/group/chromium-dev/browse_thread/thread/5b23e1a218811b3d

I'm exploring the best way to embed a plug-in within the browser control
where the plug-in is part of the container application instead of being
loaded from a separate DLL.  As a simple usage case, consider an application
where the user interface is hosted within an embedded browser window, and
the application-specific functionality is rendered using a plug-in within
that browser window.

I see two possible approaches for supporting this capability:

A) Write a custom WebPluginDelegate implementation and return an instance
from WebViewDelegate::CreatePluginDelegate().
B) Add support for embedded plug-ins to the existing NPAPI framework.

My personal preference is B, as we could then make use of the plug-in
management capabilities already provided by the NPAPI framework. In order to
implement B I propose two changes to NPAPI classes:

1) Add the following method to NPAPI::PluginLib:

static PluginLib* CreatePluginLib(const struct InternalPluginInfo& ipi);

2) Add the following method to NPAPI::PluginList:

void LoadPlugin(const struct InternalPluginInfo& ipi);

The method in #2 will internally call the method in #1.  #2 would be called
by the container application on startup to register its custom plug-in type
with the system.

struct InternalPluginInfo ipi;

// populate the ipi structure
....

// register the custom plug-in type with the system
NPAPI::PluginList::Singleton()->LoadPlugin(ipi);

Since the InternalPluginInfo structure would no longer be strictly internal
it may also be appropriate to give it a different name.

Does this proposal sound like a reasonable solution to the problem?  Is
there perhaps a better approach that I'm missing?  Any comments or
suggestions would be greatly appreciated :-)

Regards,
Marshall

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Chromium-dev" group.
To post to this group, send email to chromium-dev@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/chromium-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to