Bug 111245 - Add API to allow WK2 clients to query the list of installed plug-ins.
Summary: Add API to allow WK2 clients to query the list of installed plug-ins.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jer Noble
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2013-03-01 23:41 PST by Jer Noble
Modified: 2013-03-04 14:10 PST (History)
8 users (show)

See Also:


Attachments
Patch (4.72 KB, patch)
2013-03-02 08:26 PST, Jer Noble
no flags Details | Formatted Diff | Diff
Patch (12.09 KB, patch)
2013-03-04 12:00 PST, Jer Noble
no flags Details | Formatted Diff | Diff
Patch (12.13 KB, patch)
2013-03-04 12:24 PST, Jer Noble
ap: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jer Noble 2013-03-01 23:41:03 PST
Add API to allow WK2 clients to query the list of installed plug-ins.
Comment 1 Jer Noble 2013-03-02 08:26:45 PST
Created attachment 191107 [details]
Patch
Comment 2 Jon Lee 2013-03-02 18:05:51 PST
<rdar://problem/13329717>
Comment 3 Maciej Stachowiak 2013-03-04 01:23:59 PST
Comment on attachment 191107 [details]
Patch

r=me
Comment 4 Alexey Proskuryakov 2013-03-04 09:47:37 PST
From past experience, loading plugins is known to be a very expensive operation. Shouldn't this API be asynchronous, returning the answer in a callback?
Comment 5 Jer Noble 2013-03-04 09:51:03 PST
The handling of this call occurs entirely within the UIProcess.  Unless we wanted to marshal the request on another thread, what would the point of a callback be?
Comment 6 Brady Eidson 2013-03-04 09:52:22 PST
Comment on attachment 191107 [details]
Patch

Indeed.  PluginInfoStore::plugins() potentially does all sorts of heavy handed i/o.  I'm going to go so far as to change this to an r- until Jer can convince us it's okay to be synchronous.
Comment 7 Brady Eidson 2013-03-04 09:53:38 PST
(In reply to comment #5)
> The handling of this call occurs entirely within the UIProcess.  Unless we wanted to marshal the request on another thread, what would the point of a callback be?

When will this new API be called?

Have you explored marshaling to another thread?
Comment 8 Jer Noble 2013-03-04 12:00:56 PST
Created attachment 191283 [details]
Patch
Comment 9 kov's GTK+ EWS bot 2013-03-04 12:06:04 PST
Comment on attachment 191283 [details]
Patch

Attachment 191283 [details] did not pass gtk-ews (gtk):
Output: http://webkit-commit-queue.appspot.com/results/16967063
Comment 10 Brady Eidson 2013-03-04 12:23:16 PST
Comment on attachment 191283 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=191283&action=review

> Source/WebKit2/UIProcess/API/C/WKContext.h:52
>      WKContextPlugInAutoStartOriginHashesChangedCallback                 plugInAutoStartOriginHashesChanged;
>      WKContextNetworkProcessDidCrashCallback                             networkProcessDidCrash;
> +    WKContextPlugInInformationAvailableCallback                         plugInInformationAvailable;

Please add a // Version 1 comment before the new callback.  See WKPage.h for the loaderclient and uiclient for examples.
Comment 11 Jer Noble 2013-03-04 12:24:46 PST
Created attachment 191289 [details]
Patch
Comment 12 Alexey Proskuryakov 2013-03-04 12:34:33 PST
Comment on attachment 191289 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=191289&action=review

> Source/WebKit2/UIProcess/API/C/WKContext.h:56
> +    WKContextPlugInInformationAvailableCallback                         plugInInformationAvailable;

Maybe plugInInformationBecameAvailable or plugInInformationLoaded?

> Source/WebKit2/UIProcess/Plugins/PluginInfoStore.h:41
> +class PluginInfoStoreClient {

It would be nice to put this in a separate file. PluginInfoStore.h has data and includes a client is unlikely to ever care about, yet it currently has to include the whole thing to implement PluginInfoStoreClient interface.

Not such a big deal, since there is only one client that's already huge.
Comment 13 Jer Noble 2013-03-04 14:10:29 PST
Committed r144672: <http://trac.webkit.org/changeset/144672>