If you find a liked extension on chrome web store, you can install it just by simple click the "ADD TO CHROME" button.
![addtochrome](https://errong.win/content/images/2018/01/addtochrome.PNG)
Let's go deep into chromium codes, and see how it happened.
The key module is chrome.webstore, which a buildin JS object in chrome.
chrome/renderer/extensions/webstore_bindings.cc
chrome/renderer/extensions/webstore_bindings.h
![chrome-install-extensions](https://errong.win/content/images/2018/01/chrome-install-extensions.PNG)
Let's go deep into chromium codes, and see how it happened.
The key module is chrome.webstore, which a buildin JS object in chrome.
chrome/renderer/extensions/webstore_bindings.cc
chrome/renderer/extensions/webstore_bindings.h
WebstoreBindings::Install
TabHelper::DoInlineInstall
WebstoreInlineInstaller::BeginInstall
WebstoreStandaloneInstaller::ProceedWithInstallPrompt
ShowInstallUI
show install prompt dialogWebstoreStandaloneInstaller::ProceedWithInstallPrompt
NavigationObserver::OnInstallPromptDone
ExtensionService::EnableExtension
ExtensionRegistrar::EnableExtension
No comments:
Post a Comment