mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-18 15:55:59 +01:00
Workspace trust - update proposed APIs (#291408)
Workspace trust - add proposed API to check whether a URI is trusted and an event for when the list of trusted folders/workspaces change
This commit is contained in:
@@ -1271,6 +1271,14 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
||||
checkProposedApiEnabled(extension, 'workspaceTrust');
|
||||
return extHostWorkspace.requestWorkspaceTrust(options);
|
||||
},
|
||||
isResourceTrusted: (resource: vscode.Uri) => {
|
||||
checkProposedApiEnabled(extension, 'workspaceTrust');
|
||||
return extHostWorkspace.isResourceTrusted(resource);
|
||||
},
|
||||
onDidChangeWorkspaceTrustedFolders: (listener, thisArgs?, disposables?) => {
|
||||
checkProposedApiEnabled(extension, 'workspaceTrust');
|
||||
return _asExtensionEvent(extHostWorkspace.onDidChangeWorkspaceTrustedFolders)(listener, thisArgs, disposables);
|
||||
},
|
||||
onDidGrantWorkspaceTrust: (listener, thisArgs?, disposables?) => {
|
||||
return _asExtensionEvent(extHostWorkspace.onDidGrantWorkspaceTrust)(listener, thisArgs, disposables);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user