blob: 4b5913c04efb9cce2a683f506b5b4928cb8c933e [file] [log] [blame]
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import {AnnotationPluginApi, CoverageProvider} from '../../../api/annotation';
import {PluginApi} from '../../../api/plugin';
import {PluginsModel} from '../../../models/plugins/plugins-model';
import {ReportingService} from '../../../services/gr-reporting/gr-reporting';
export class GrAnnotationActionsInterface implements AnnotationPluginApi {
constructor(
private readonly reporting: ReportingService,
private readonly pluginsModel: PluginsModel,
private readonly plugin: PluginApi
) {
this.reporting.trackApi(this.plugin, 'annotation', 'constructor');
}
setCoverageProvider(provider: CoverageProvider) {
this.reporting.trackApi(this.plugin, 'annotation', 'setCoverageProvider');
this.pluginsModel.coverageRegister({
pluginName: this.plugin.getPluginName(),
provider,
});
}
}