chromium : extensions, how a extension list on web store was installed to chrome

If you find a liked extension on chrome web store, you can install it just by simple click the "ADD TO CHROME" button.
addtochrome

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

WebstoreBindings::Install
TabHelper::DoInlineInstall
WebstoreInlineInstaller::BeginInstall
WebstoreStandaloneInstaller::ProceedWithInstallPrompt
ShowInstallUI

show install prompt dialog

WebstoreStandaloneInstaller::ProceedWithInstallPrompt
NavigationObserver::OnInstallPromptDone
ExtensionService::EnableExtension
ExtensionRegistrar::EnableExtension

Subscribe to Post, Code and Quiet Time.

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe