chromium/chrome/services/file_util/public/mojom/file_util_service.mojom

// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

module chrome.mojom;

import "sandbox/policy/mojom/sandbox.mojom";

[EnableIf=full_safe_browsing]
import "chrome/services/file_util/public/mojom/safe_archive_analyzer.mojom";

[EnableIf=is_chromeos_ash]
import "chrome/services/file_util/public/mojom/zip_file_creator.mojom";

[EnableIf=extractors]
import "chrome/services/file_util/public/mojom/single_file_extractor.mojom";

// The main interface to the file utility service. Binds any of various
// specific utility receivers.
[ServiceSandbox=sandbox.mojom.Sandbox.kService]
interface FileUtilService {
  // Binds an instance of the ZipFileCreator interface.
  [EnableIf=is_chromeos_ash]
  BindZipFileCreator(pending_receiver<ZipFileCreator> receiver);

  // Binds an instance of the SafeArchiveAnalyzer interface.
  [EnableIf=full_safe_browsing]
  BindSafeArchiveAnalyzer(pending_receiver<SafeArchiveAnalyzer> receiver);

  // Binds a SingleFileTarFileExtractor instance of the SingleFileExtractor
  // interface.
  [EnableIf=extractors]
  BindSingleFileTarFileExtractor(
      pending_receiver<SingleFileExtractor> receiver);

  // Binds a SingleFileTarXzFileExtractor instance of the SingleFileExtractor
  // interface.
  [EnableIf=extractors]
  BindSingleFileTarXzFileExtractor(
      pending_receiver<SingleFileExtractor> receiver);
};