The way this works is simple: The Browser becomes the OS. Where you had an abstraction protected by API's in a previous OS, you now just have an interface provided to you by the local client (browser). All of this can be abstracted easily enough, and will be .. its already happening on Android, where you can access GPS and Accelerometer from the browser ..
It depends, also, on the hardware integration. Hey, good thing there is a VM around to handle this issue.