Merge branch 'master' into aeschli/specific-codicon-names

This commit is contained in:
Martin Aeschlimann
2020-04-21 12:32:29 +02:00
72 changed files with 2879 additions and 1751 deletions

View File

@@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { app, ipcMain as ipc, systemPreferences, shell, Event, contentTracing, protocol, powerMonitor, IpcMainEvent, BrowserWindow, dialog } from 'electron';
import { app, ipcMain as ipc, systemPreferences, shell, Event, contentTracing, protocol, powerMonitor, IpcMainEvent, BrowserWindow, dialog, session } from 'electron';
import { IProcessEnvironment, isWindows, isMacintosh } from 'vs/base/common/platform';
import { WindowsMainService } from 'vs/platform/windows/electron-main/windowsMainService';
import { IWindowOpenable } from 'vs/platform/windows/common/windows';
@@ -129,7 +129,7 @@ export class CodeApplication extends Disposable {
}
});
// Security related measures (https://electronjs.org/docs/tutorial/security)
//#region Security related measures (https://electronjs.org/docs/tutorial/security)
//
// !!! DO NOT CHANGE without consulting the documentation !!!
//
@@ -212,8 +212,18 @@ export class CodeApplication extends Disposable {
shell.openExternal(url);
});
session.defaultSession.setPermissionRequestHandler((webContents, permission /* 'media' | 'geolocation' | 'notifications' | 'midiSysex' | 'pointerLock' | 'fullscreen' | 'openExternal' */, callback) => {
return callback(false);
});
session.defaultSession.setPermissionCheckHandler((webContents, permission /* 'media' */) => {
return false;
});
});
//#endregion
let macOpenFileURIs: IWindowOpenable[] = [];
let runningTimeout: NodeJS.Timeout | null = null;
app.on('open-file', (event: Event, path: string) => {

View File

@@ -409,7 +409,7 @@ export class CodeWindow extends Disposable implements ICodeWindow {
return callback({ cancel: true });
}
return callback({ cancel: false, responseHeaders });
return callback({ cancel: false });
});
// Remember that we loaded