What is the method the Chrome Web Store uses to launch an application?

血红的双手。 提交于 2019-12-12 07:04:01

问题


I'm just wondering how the Chrome Web Store is implemented. There is a web site that has an option to LAUNCH APP. What happens when that button is clicked. How does it go about launching the extension?

You can find the Chrome Signal Application here


回答1:


Chrome uses an internal extension to grant special permissions to that page (namely "webstorePrivate" and "management"). There's not much to it in Chrome proper:

  • The manifest for webstore_app is at https://cs.chromium.org/chromium/src/chrome/browser/resources/webstore_app/manifest.json
  • The management API is documented at https://developer.chrome.com/extensions/management, since it's usable by other extensions
  • The webstorePrivate API is not documented except at https://cs.chromium.org/chromium/src/chrome/common/extensions/api/webstore_private.json, since it's not usable by other extensions.

All the code that actually calls these APIs is served from Google's servers for the web store page itself. As a starting point, if you open the developer tools on the Chrome web store and type chrome.runtime.id, it will respond with "ahfgeienlihckogmohjhadlkjgocpleb".



来源:https://stackoverflow.com/questions/43857228/what-is-the-method-the-chrome-web-store-uses-to-launch-an-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!