Path: blob/main/src/vs/workbench/services/accessibility/common/accessibleViewInformationService.ts
3296 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import { Disposable } from '../../../../base/common/lifecycle.js';6import { ACCESSIBLE_VIEW_SHOWN_STORAGE_PREFIX } from '../../../../platform/accessibility/common/accessibility.js';7import { createDecorator } from '../../../../platform/instantiation/common/instantiation.js';8import { IStorageService, StorageScope } from '../../../../platform/storage/common/storage.js';910export interface IAccessibleViewInformationService {11_serviceBrand: undefined;12hasShownAccessibleView(viewId: string): boolean;13}1415export const IAccessibleViewInformationService = createDecorator<IAccessibleViewInformationService>('accessibleViewInformationService');1617export class AccessibleViewInformationService extends Disposable implements IAccessibleViewInformationService {18declare readonly _serviceBrand: undefined;19constructor(@IStorageService private readonly _storageService: IStorageService) {20super();21}22hasShownAccessibleView(viewId: string): boolean {23return this._storageService.getBoolean(`${ACCESSIBLE_VIEW_SHOWN_STORAGE_PREFIX}${viewId}`, StorageScope.APPLICATION, false) === true;24}25}262728