RESOLVED FIXED 86348
Speech JavaScript API: pass WebSecurityOrigin to embedder
https://bugs.webkit.org/show_bug.cgi?id=86348
Summary Speech JavaScript API: pass WebSecurityOrigin to embedder
Hans Wennborg
Reported 2012-05-14 03:22:39 PDT
Speech JavaScript API: pass WebSecurityOrigin to embedder
Attachments
Patch (4.08 KB, patch)
2012-05-14 03:29 PDT, Hans Wennborg
no flags
Hans Wennborg
Comment 1 2012-05-14 03:29:15 PDT
WebKit Review Bot
Comment 2 2012-05-14 03:32:22 PDT
Please wait for approval from abarth@webkit.org, dglazkov@chromium.org, fishd@chromium.org, jamesr@chromium.org or tkent@chromium.org before submitting, as this patch contains changes to the Chromium public API. See also https://trac.webkit.org/wiki/ChromiumWebKitAPI.
Adam Barth
Comment 3 2012-05-14 11:00:01 PDT
Comment on attachment 141680 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=141680&action=review > Source/WebKit/chromium/ChangeLog:10 > + Pass the WebSecurityOrigin of the SpeecReco object to the embedder when calling > + start(). The origin will be used to determine whether speech recognition is > + allowed or not. Why not just ask the embedder whether speech recognition is allowed using http://trac.webkit.org/browser/trunk/Source/WebKit/chromium/public/WebPermissionClient.h ?
Hans Wennborg
Comment 4 2012-05-15 04:02:15 PDT
> Why not just ask the embedder whether speech recognition is allowed using http://trac.webkit.org/browser/trunk/Source/WebKit/chromium/public/WebPermissionClient.h ? Can WebPermissionClient be used in an asynchronous way? I was looking at how Geolocation does this, and we'd like to do something similar. The idea is that the page would request start() of speech recognition. The embedder would then asynchronously ask for the user's permission. If it's denied, we fire an error event, otherwise we start recognizing. Looking at WebPermissionClient, it seems more suited to static permissions, so I'm not sure it would work here?
Adam Barth
Comment 5 2012-05-15 11:09:10 PDT
Yeah, we've been using WebPermissionClient when we need a synchronous answer. @fishd: Is this patch the right approach for asynchronous permissions?
Darin Fisher (:fishd, Google)
Comment 6 2012-05-15 14:01:24 PDT
EXAMPLES 1. Notifications: void WebNotificationPresenter::requestPermission(origin, callback) WebNotificationPresenter* WebViewClient::notificationPresenter() 2. Geolocation: void WebGeolocationClient::requestPermission(request) WebGeolocationClient* WebViewClient::geolocationClient() We don't seem to have a generic async mechanism.
Adam Barth
Comment 7 2012-05-15 14:09:12 PDT
Comment on attachment 141680 [details] Patch Ok. Sounds like this approach is fine then. Thanks.
WebKit Review Bot
Comment 8 2012-05-16 03:24:08 PDT
Comment on attachment 141680 [details] Patch Clearing flags on attachment: 141680 Committed r117251: <http://trac.webkit.org/changeset/117251>
WebKit Review Bot
Comment 9 2012-05-16 03:24:13 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.