44 *--------------------------------------------------------------------------------------------*/
55
66import { IWindowsMainService } from 'vs/platform/windows/electron-main/windows' ;
7- import { MessageBoxOptions , MessageBoxReturnValue , shell , OpenDevToolsOptions , SaveDialogOptions , SaveDialogReturnValue , OpenDialogOptions , OpenDialogReturnValue } from 'electron' ;
7+ import { MessageBoxOptions , MessageBoxReturnValue , shell , OpenDevToolsOptions , SaveDialogOptions , SaveDialogReturnValue , OpenDialogOptions , OpenDialogReturnValue , CrashReporterStartOptions , crashReporter } from 'electron' ;
88import { ILifecycleMainService } from 'vs/platform/lifecycle/electron-main/lifecycleMainService' ;
99import { OpenContext , INativeOpenDialogOptions } from 'vs/platform/windows/common/windows' ;
1010import { isMacintosh } from 'vs/base/common/platform' ;
@@ -143,6 +143,21 @@ export class ElectronMainService implements ElectronServiceInterface {
143143
144144 //#endregion
145145
146+ //#region Connectivity
147+
148+ async resolveProxy ( windowId : number , url : string ) : Promise < string | undefined > {
149+ return new Promise ( resolve => {
150+ const window = this . windowsMainService . getWindowById ( windowId ) ;
151+ if ( window && window . win && window . win . webContents && window . win . webContents . session ) {
152+ window . win . webContents . session . resolveProxy ( url , proxy => resolve ( proxy ) ) ;
153+ } else {
154+ resolve ( ) ;
155+ }
156+ } ) ;
157+ }
158+
159+ //#endregion
160+
146161 //#region Development
147162
148163 async openDevTools ( windowId : number , options ?: OpenDevToolsOptions ) : Promise < void > {
@@ -164,19 +179,8 @@ export class ElectronMainService implements ElectronServiceInterface {
164179 }
165180 }
166181
167- //#endregion
168-
169- //#region Connectivity
170-
171- async resolveProxy ( windowId : number , url : string ) : Promise < string | undefined > {
172- return new Promise ( resolve => {
173- const window = this . windowsMainService . getWindowById ( windowId ) ;
174- if ( window && window . win && window . win . webContents && window . win . webContents . session ) {
175- window . win . webContents . session . resolveProxy ( url , proxy => resolve ( proxy ) ) ;
176- } else {
177- resolve ( ) ;
178- }
179- } ) ;
182+ async startCrashReporter ( windowId : number , options : CrashReporterStartOptions ) : Promise < void > {
183+ crashReporter . start ( options ) ;
180184 }
181185
182186 //#endregion
0 commit comments