chromium/extensions/common/api/shared_module.idl

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

// Stub namespace for the "import" and "export" manifest keys.
[generate_error_messages]
namespace sharedModule {
  dictionary Import {
    // Extension ID of the shared module this extension or app depends on.
    DOMString id;

    // Minimum supported version of the shared module.
    DOMString? minimum_version;
  };

  dictionary Export {
    // Optional list of extension IDs explicitly allowed to import this Shared
    // Module's resources.  If no allowlist is given, all extensions are allowed
    // to import it.
    DOMString[]? allowlist;
  };

  dictionary ManifestKeys {
    // The import field is used by extensions and apps to declare that they
    // depend on the resources from particular Shared Modules.
    Import[]? import;

    // The export field indicates an extension is a Shared Module that exports
    // its resources.
    Export? export;
  };
};