Currently, I'm adding these with an AppendSwitchWithValue on register-pepper-plugins in ClientAppBrowser::OnBeforeCommandLineProcessing - this appears to be working for a single plugin, but as my future list of plugins may grow fairly large, I'm concerned about running out of command-line string space.
- Code: Select all
// This technique works for registering a PPAPI plugin
const string x86Path = "C:\\Program Files (x86)\\Path\\To\\My\\Plugin\\Myplugin32.dll";
const string mimeType = "application/x-ppapi-myplugin";
command_line->AppendSwitch(switches::kPPAPIOutOfProcess);
string plugin = x86Path;
plugin += ";";
plugin += mimeType;
CefString cefPlugin(plugin);
command_line->AppendSwitchWithValue(switches::kRegisterPepperPlugins, cefPlugin);
I tried the CefAddWebPluginPath/CefRefreshWebPlugins in ClienAppBrowser::OnContextInitialized, however this didn't appear to work, and I'm unclear on how one specifies the MIME type binding for the plugin using this API.
- Code: Select all
// This doesn't error, but the test page that works with the above doesn't load the plugin
// How does the MIME type get established via this API?
const string x86Path = "C:\\Program Files (x86)\\Path\\To\\My\\Plugin\\Myplugin32.dll";
const string mimeType = "application/x-ppapi-myplugin";
CefString plugin(x86Path);
//CefString plugin(x86Path + ";" + mimeType); // Is this the right syntax for the arg? API docs and other forum posts imply it is just path to DLL
CefAddWebPluginPath(plugin);
CefRefreshWebPlugins();
Am I missing some other registration step? (The plugins are being provided to me as pre-built DLLs - is the MIME type supposed to be encoded/registered in PPAPI DLLs? Is there some way I can review/change these bindings?)