You should use mark the plugin with "public": true
in your extensions’s manifest. The plugin should show up in about:plugins
.
If the plugin shows up, confirm that the MIME type and file extensions in about:plugins matches the type of the embed element being injected into the page. Also check to see if other plugins have the same MIME type. If a plugin that is listed earlier has the same MIME type, that plugin will be loaded.
If your plugin doesn’t show up, or it shows up but does not work, you’ve got more detective work to do:
You can start Chrome with the --debug-plugin-loading
flag to get extra logging from the plugin infrastructure. Some of these messages look like this:
[24634:-1392008512:1466799063452984:ERROR:plugin_list.cc(358)] Loading plugin /Library/Internet Plug-Ins/Flash Player.plugin
Despite containing the word ERROR, these messages are not errors. ERROR is just the log level. Use Chromium Code Search and the files mentioned in the log (for example plugin_list.cc) to read the log messages in context. Chrome uses a multi-process architecture. So remember that the output might intersperse log messages from different processes.
If you have the source of your plugin, you put logging statements in your plugin code. For example, on OS X you could write:
NPError NP_GetEntryPoints(NPPluginFuncs *pluginFuncs) {
NSLog(@"FOO NP_GetEntryPoints");
…
and then
2012-08-20 11:22:56.799 Google Chrome Helper EH[23544:b03] FOO NP_GetEntryPoints
will show up in the log. These log statements can give you further clues about how far plugin loading is getting before it fails.
It will take some effort, but you could build Chromium from scratch and use the --plugin-launcher
command line option to get source-level debugging of the plugin loader.