The chrome.extension module has utilities that can be used by any extension page. It includes support for exchanging messages between an extension and its content scripts or between extensions, as described in detail in Message Passing.

Support for content scripts

Unlike the other chrome.* APIs, parts of chrome.extension can be used by content scripts:

$ref:extension.sendMessage and $ref:extension.onMessage
Simple communication with extension pages
$ref:extension.connect and $ref:extension.onConnect
Extended communication with extension pages
$ref:extension.getURL
Access to extension resources such as image files

For details, see Content Scripts.