sandbox - add webFrame APIs

This commit is contained in:
Benjamin Pasero
2020-05-25 08:40:07 +02:00
parent 062d9393d8
commit 246d25965c
8 changed files with 32 additions and 9 deletions

View File

@@ -4,8 +4,8 @@
*--------------------------------------------------------------------------------------------*/
import 'vs/css!./media/issueReporter';
import { clipboard, shell, webFrame } from 'electron';
import { ipcRenderer } from 'vs/base/electron-sandbox/globals';
import { clipboard, shell } from 'electron';
import { ipcRenderer, webFrame } from 'vs/base/electron-sandbox/globals';
import * as os from 'os';
import * as browser from 'vs/base/browser/browser';
import { $ } from 'vs/base/browser/dom';

View File

@@ -70,6 +70,17 @@
getZoomFactor() {
return webFrame.getZoomFactor();
},
getZoomLevel() {
return webFrame.getZoomLevel();
},
/**
* @param {number} level
*/
setZoomLevel(level) {
webFrame.setZoomLevel(level);
}
}
};

View File

@@ -4,8 +4,8 @@
*--------------------------------------------------------------------------------------------*/
import 'vs/css!./media/processExplorer';
import { webFrame, clipboard } from 'electron';
import { ipcRenderer } from 'vs/base/electron-sandbox/globals';
import { clipboard } from 'electron';
import { webFrame, ipcRenderer } from 'vs/base/electron-sandbox/globals';
import { repeat } from 'vs/base/common/strings';
import { totalmem } from 'os';
import product from 'vs/platform/product/common/product';