What is the method the Chrome Web Store uses to la

2019-09-20 02:34发布

问题:

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".