It's not required to find plugins when the plugin is disabled.
Created attachment 172489 [details] Patch
I'm not sure if this is the right direction - we may want to always use Built-in PDF plug-in, even when external ones are disabled. Tim?
(In reply to comment #2) > I'm not sure if this is the right direction - we may want to always use Built-in PDF plug-in, even when external ones are disabled. Tim? Yeah, we're definitely going to want the ability to use the Built-in PDF Plug-in even when "plug-ins" are disabled. It's not really a plugin, it's just using that infrastructure.
(In reply to comment #3) > (In reply to comment #2) > > I'm not sure if this is the right direction - we may want to always use Built-in PDF plug-in, even when external ones are disabled. Tim? > > Yeah, we're definitely going to want the ability to use the Built-in PDF Plug-in even when "plug-ins" are disabled. It's not really a plugin, it's just using that infrastructure. Basically, this patch does not change the behavior of main resource loading. The behavior is changed by bug 99449. For the application/pdf type, safari on Mac always shows PDF document in the browser even though plugins are disabled.
(In reply to comment #4) > (In reply to comment #3) > > (In reply to comment #2) > > > I'm not sure if this is the right direction - we may want to always use Built-in PDF plug-in, even when external ones are disabled. Tim? > > > > Yeah, we're definitely going to want the ability to use the Built-in PDF Plug-in even when "plug-ins" are disabled. It's not really a plugin, it's just using that infrastructure. > > Basically, this patch does not change the behavior of main resource loading. The behavior is changed by bug 99449. > > For the application/pdf type, safari on Mac always shows PDF document in the browser even though plugins are disabled. This may be true by default, however, the ENABLE_PDFKIT_PLUGIN flag makes WebKit use PDFPlugin in the main-frame case.
I will check it later.
Another note: We actually want to get rid of WebPageProxy::canShowMIMEType since it can potentially do sync IO on the main thread when loading the plug-in store.