// Copyright 2024 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // GENERATED FROM THE API DEFINITION IN // chrome/common/extensions/api/permissions.json // by tools/json_schema_compiler. // DO NOT EDIT. #ifndef CHROME_COMMON_EXTENSIONS_API_PERMISSIONS_H__ #define CHROME_COMMON_EXTENSIONS_API_PERMISSIONS_H__ #include <stdint.h> #include <map> #include <memory> #include <optional> #include <string> #include <vector> #include "base/values.h" namespace extensions { namespace api { namespace permissions { // // Types // struct Permissions { … }; // // Functions // namespace GetAll { namespace Results { // The extension's active permissions. Note that the <code>origins</code> // property will contain granted origins from those specified in the // <code>permissions</code> and <code>optional_permissions</code> keys in the // manifest and those associated with <a href='content_scripts'>Content // Scripts</a>. base::Value::List Create(const Permissions& permissions); } // namespace Results } // namespace GetAll namespace Contains { struct Params { … }; namespace Results { // True if the extension has the specified permissions. If an origin is // specified as both an optional permission and a content script match pattern, // this will return <code>false</code> unless both permissions are granted. base::Value::List Create(bool result); } // namespace Results } // namespace Contains namespace Request { struct Params { … }; namespace Results { // True if the user granted the specified permissions. base::Value::List Create(bool granted); } // namespace Results } // namespace Request namespace Remove { struct Params { … }; namespace Results { // True if the permissions were removed. base::Value::List Create(bool removed); } // namespace Results } // namespace Remove namespace AddSiteAccessRequest { struct Params { … }; namespace Results { base::Value::List Create(); } // namespace Results } // namespace AddSiteAccessRequest namespace RemoveSiteAccessRequest { struct Params { … }; namespace Results { base::Value::List Create(); } // namespace Results } // namespace RemoveSiteAccessRequest // // Events // namespace OnAdded { extern const char kEventName[]; // "permissions.onAdded" // The newly acquired permissions. base::Value::List Create(const Permissions& permissions); } // namespace OnAdded namespace OnRemoved { extern const char kEventName[]; // "permissions.onRemoved" // The permissions that have been removed. base::Value::List Create(const Permissions& permissions); } // namespace OnRemoved } // namespace permissions } // namespace api } // namespace extensions #endif // CHROME_COMMON_EXTENSIONS_API_PERMISSIONS_H__