Provide a Geolocation API provider interface to extensions
Reported by
micol...@gmail.com,
Mar 13 2016
|
||||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.75 Safari/537.36 Steps to reproduce the problem: 1. Load up a web page which uses the HTML5 Geolocation. What is the expected behavior? Expect Chrome to use location services available on the platform. What went wrong? Chrome instead only uses WiFi positioning, unless you monkey-patch in your own extension on every page which uses it. And then, you loose permissions around the Geolocation API provided by Chrome, and it's all pretty ugly. WebStore page: Did this work before? Yes Incremental breakages in 2011 and 2013 for Linux and Windows respectively Chrome version: 49.0.2623.75 Channel: stable OS Version: Flash Version: n/a Issue 99177 makes a point that libgps (Linux) lacks a stable ABI, so support for gpsd was dropped in 2011. Issue 45535 talks about supporting Windows Location Services, but that was dropped in 2013 due to inactivity. What would be better than this is to allow Chrome extensions to act as a Geolocation Provider, in much the same way it is possible to expose certificate management[0], printers[1] and VPNs[2]. When a Geolocation API request is made from a web page, this would spin up the location provider, and allow it to either run on a pull or push mechanism, ie: 1. Every time a page wants a location (aggregated upto a maximum of 1/sec), the provider returns the current position of the device 2. Location services can be "started" on the first request, then the provider will continually provide data for the Geolocation API to consume at whatever rate it likes, and can be shut down when no longer in use. At present, the only way to do this is to write a Chrome extension which hijacks the `navigator.geolocation` APIs in a web page. This has some drawbacks: * In an activeTab permission model, this must be manually started for each page. As a result, pages which query the API onLoad will not work. * In a non-activeTab permission model, all pages must be monitored by the extension. * The extension must implement it's own permissions system. * The extension will not be up to date with current security requirements (eg: Issue 561641 ) * The extension needs to track all the watchers on it's own. I've implemented an extension which does this for gpsd[3], but it's an ugly hack that I'd like to replace with using an API which allows me to plug in as a proper provider. This could also interface directly with USB GPS devices on non-ChromeOS platforms. This could also be extended to allow use of third-party WiFi and BLE location data sources. So if an organisation had a large fleet of WiFi access points and knew the exact position of them, this could plug into an internal facing trilateration service instead of a public one. This would push the burden of writing location providers into extension space, and could be updated outside of the normal Chrome release cycle. [0]: https://developer.chrome.com/extensions/certificateProvider [1]: https://developer.chrome.com/apps/printerProvider [2]: https://developer.chrome.com/extensions/vpnProvider [3]: https://github.com/micolous/gpsd-chrome-polyfill
,
Sep 23 2016
,
Sep 25 2017
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Sep 28 2017
,
Sep 28
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Sep 28
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by rob@robwu.nl
, May 15 2016Labels: -Type-Bug Type-Feature
Status: Untriaged (was: Unconfirmed)