Google is currently designing an API to increase the interoperability of web applications with native applications. Google is calling it the Writable Files API, and is asking for the developer community's support in the design process. Not only is syncing functionality across native and web applications difficult in itself, the concept requires significant access to user data and opens the API to potential abuse. Google is seeking feedback on the security front as well.
The Writable Files API is part of Google's capabilities project. The capabilities projects aims to take common local capabilities (e.g. file system access, idle detection, etc.) and make them readily available for web apps. Editing local files is one such scenario that doesn't translate well to a web app. Through the Writable Files APIs, developers can create a straightforward, single file editor that allows a user to open and edit a file, and save directly back to the same file (as opposed to downloading and re-uploading, or replacing). Check out the sample code to see how this API might be implemented.
As mentioned, Google is still working out security for the API. The API's entry point is a file picker to ensure user control. With automated access to user data, there is potential for abuse, and Google has published a security model to address the situation. Google is asking for feedback on its model. Follow the capabilities project to stay up to date on all project elements.