extensions_browser_api_provider.h 1.1 KB

1234567891011121314151617181920212223242526272829
  1. // Copyright 2018 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_API_PROVIDER_H_
  5. #define EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_API_PROVIDER_H_
  6. class ExtensionFunctionRegistry;
  7. namespace extensions {
  8. // A class to provide browser-side, API-specific knowledge to the extensions
  9. // system. This allows for composition of multiple providers, so that we can
  10. // easily add or subtract features in different configurations.
  11. class ExtensionsBrowserAPIProvider {
  12. public:
  13. ExtensionsBrowserAPIProvider() = default;
  14. ExtensionsBrowserAPIProvider(const ExtensionsBrowserAPIProvider&) = delete;
  15. ExtensionsBrowserAPIProvider& operator=(const ExtensionsBrowserAPIProvider&) =
  16. delete;
  17. virtual ~ExtensionsBrowserAPIProvider() = default;
  18. // Registers any API functions in the given |registry|.
  19. virtual void RegisterExtensionFunctions(
  20. ExtensionFunctionRegistry* registry) = 0;
  21. };
  22. } // namespace extensions
  23. #endif // EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_API_PROVIDER_H_