Hi folks,
I want to make a custom build of chromium to link HTML <object> tags with different MIME-types (type property of the tag) to different Javascript classes, like it was possible with NPPlugins earlier.
I use Websites that are provided to me (So I cant change the JS code!) and work together with a self-written NPAPI Plugin. The Javascript objects are created with <object> tags with different MIME-types (defined by the type property). The Plugin provides several propertys and methods (different ones for each mime-type) that are accessed by Javascript code. As PPAPI does not support direct acces to propertys and methods in Javascript and NPAPI support was removed in recent versions of Chromium, I want to build a recent chromium that has the functionality build-in.
So, what is the best way to do this? I think I have to create a class with my previous implementation for each of my plugin types (in third_party/WebKit/Source/core/xyz) and create a .idl file for each to auto-generate the bindings to V8. The thing that I am not sure about, is the best way to link that classes to the <object> HTML tag depending on the "type" property of the tag.
By default, the HTMLObjectFactory of blink determines on the tag name, which HTML object to create, and creates a HTMLObjectElement for the <object> tag. Whats the best way to extend the HTMLObjectElement to offer methods and propertys that depend on the mime-type? How can methods and propertys, that are not defined within the HTMLObjectElement.idl file, be registered at runtime (as soon as the plugin type was determined)? I did not work with the chromium source code yet and need some help.
Thank you in advance!