2019-07-24 23:01:08 +00:00
|
|
|
// Copyright 2018 The Chromium Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2021-11-22 07:34:31 +00:00
|
|
|
#ifndef ELECTRON_SHELL_COMMON_EXTENSIONS_ELECTRON_EXTENSIONS_API_PROVIDER_H_
|
|
|
|
#define ELECTRON_SHELL_COMMON_EXTENSIONS_ELECTRON_EXTENSIONS_API_PROVIDER_H_
|
2019-07-24 23:01:08 +00:00
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#include "extensions/common/extensions_api_provider.h"
|
|
|
|
|
|
|
|
namespace electron {
|
|
|
|
|
2020-02-03 22:01:10 +00:00
|
|
|
class ElectronExtensionsAPIProvider : public extensions::ExtensionsAPIProvider {
|
2019-07-24 23:01:08 +00:00
|
|
|
public:
|
2020-02-03 22:01:10 +00:00
|
|
|
ElectronExtensionsAPIProvider();
|
|
|
|
~ElectronExtensionsAPIProvider() override;
|
2019-07-24 23:01:08 +00:00
|
|
|
|
2021-11-03 11:41:45 +00:00
|
|
|
// disable copy
|
|
|
|
ElectronExtensionsAPIProvider(const ElectronExtensionsAPIProvider&) = delete;
|
|
|
|
ElectronExtensionsAPIProvider& operator=(
|
|
|
|
const ElectronExtensionsAPIProvider&) = delete;
|
|
|
|
|
2019-07-24 23:01:08 +00:00
|
|
|
// ExtensionsAPIProvider:
|
|
|
|
void AddAPIFeatures(extensions::FeatureProvider* provider) override;
|
|
|
|
void AddManifestFeatures(extensions::FeatureProvider* provider) override;
|
|
|
|
void AddPermissionFeatures(extensions::FeatureProvider* provider) override;
|
|
|
|
void AddBehaviorFeatures(extensions::FeatureProvider* provider) override;
|
|
|
|
void AddAPIJSONSources(
|
|
|
|
extensions::JSONFeatureProviderSource* json_source) override;
|
|
|
|
bool IsAPISchemaGenerated(const std::string& name) override;
|
2024-01-25 17:46:30 +00:00
|
|
|
std::string_view GetAPISchema(const std::string& name) override;
|
2019-07-24 23:01:08 +00:00
|
|
|
void RegisterPermissions(
|
|
|
|
extensions::PermissionsInfo* permissions_info) override;
|
|
|
|
void RegisterManifestHandlers() override;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace electron
|
|
|
|
|
2021-11-22 07:34:31 +00:00
|
|
|
#endif // ELECTRON_SHELL_COMMON_EXTENSIONS_ELECTRON_EXTENSIONS_API_PROVIDER_H_
|