1 // Copyright (c) 2014 Intel Corporation. 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.
5 #ifndef XWALK_EXTENSIONS_PUBLIC_XW_EXTENSION_PERMISSIONS_H_
6 #define XWALK_EXTENSIONS_PUBLIC_XW_EXTENSION_PERMISSIONS_H_
8 // NOTE: This file and interfaces marked as internal are not considered stable
9 // and can be modified in incompatible ways between Crosswalk versions.
11 #ifndef XWALK_EXTENSIONS_PUBLIC_XW_EXTENSION_H_
12 #error "You should include XW_Extension.h before this file"
19 #define XW_INTERNAL_PERMISSIONS_INTERFACE_1 \
20 "XW_Internal_PermissionsInterface_1"
21 #define XW_INTERNAL_PERMISSIONS_INTERFACE \
22 XW_INTERNAL_PERMISSIONS_INTERFACE_1
25 // XW_INTERNAL_PERMISSIONS_INTERFACE: provides a way for extensions
26 // check if they have the proper permissions for certain APIs.
29 struct XW_Internal_PermissionsInterface_1 {
30 int (*CheckAPIAccessControl)(XW_Extension extension, const char* api_name);
31 int (*RegisterPermissions)(XW_Extension extension, const char* perm_table);
34 typedef struct XW_Internal_PermissionsInterface_1
35 XW_Internal_PermissionsInterface;
41 #endif // XWALK_EXTENSIONS_PUBLIC_XW_EXTENSION_PERMISSIONS_H_