hookWindowForTabEvents -> hookWebContentsForTabEvents

This commit is contained in:
Kevin Sawicki 2016-06-08 11:45:03 -07:00
parent 11e68ff932
commit 4823a04a44

View file

@ -82,7 +82,7 @@ const removeBackgroundPages = function (manifest) {
} }
// Dispatch tabs events. // Dispatch tabs events.
const hookWindowForTabEvents = function (webContents) { const hookWebContentsForTabEvents = function (webContents) {
const tabId = webContents.id const tabId = webContents.id
for (const page of objectValues(backgroundPages)) { for (const page of objectValues(backgroundPages)) {
page.webContents.sendToAll('CHROME_TABS_ONCREATED', tabId) page.webContents.sendToAll('CHROME_TABS_ONCREATED', tabId)
@ -225,7 +225,7 @@ const loadDevToolsExtensions = function (win, manifests) {
webContents.on('web-contents-created', function (webContents) { webContents.on('web-contents-created', function (webContents) {
if (webContents.getType() === 'remote') return if (webContents.getType() === 'remote') return
hookWindowForTabEvents(webContents) hookWebContentsForTabEvents(webContents)
webContents.on('devtools-opened', function () { webContents.on('devtools-opened', function () {
loadDevToolsExtensions(webContents, objectValues(manifestMap)) loadDevToolsExtensions(webContents, objectValues(manifestMap))
}) })