refactor: don't expose NavigationController as an internal module (#15920)

This commit is contained in:
Milan Burda 2018-12-03 17:13:09 +01:00 коммит произвёл Alexey Kuzmin
Родитель 559fd5cb31
Коммит a33eeda4f7
4 изменённых файлов: 4 добавлений и 5 удалений

Просмотреть файл

@ -24,7 +24,6 @@ filenames = {
"lib/browser/api/menu-utils.js",
"lib/browser/api/menu.js",
"lib/browser/api/module-list.js",
"lib/browser/api/navigation-controller.js",
"lib/browser/api/net.js",
"lib/browser/api/net-log.js",
"lib/browser/api/notification.js",
@ -45,6 +44,7 @@ filenames = {
"lib/browser/guest-window-manager.js",
"lib/browser/init.js",
"lib/browser/ipc-main-internal.js",
"lib/browser/navigation-controller.js",
"lib/browser/objects-registry.js",
"lib/browser/rpc-server.js",
"lib/common/api/clipboard.js",

Просмотреть файл

@ -30,9 +30,7 @@ module.exports = [
{ name: 'Tray', file: 'tray' },
{ name: 'View', file: 'view' },
{ name: 'webContents', file: 'web-contents' },
{ name: 'WebContentsView', file: 'web-contents-view' },
// The internal modules, invisible unless you know their names.
{ name: 'NavigationController', file: 'navigation-controller', private: true }
{ name: 'WebContentsView', file: 'web-contents-view' }
]
if (features.isViewApiEnabled()) {

Просмотреть файл

@ -5,8 +5,9 @@ const { EventEmitter } = require('events')
const electron = require('electron')
const path = require('path')
const url = require('url')
const { app, ipcMain, session, NavigationController, deprecate } = electron
const { app, ipcMain, session, deprecate } = electron
const NavigationController = require('@electron/internal/browser/navigation-controller')
const ipcMainInternal = require('@electron/internal/browser/ipc-main-internal')
const errorUtils = require('@electron/internal/common/error-utils')