1 // Copyright 2015 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.
5 #ifndef MOJO_SHELL_CAPABILITY_FILTER_H_
6 #define MOJO_SHELL_CAPABILITY_FILTER_H_
11 #include "mojo/public/cpp/bindings/array.h"
18 // A set of names of interfaces that may be exposed to an application.
19 using AllowedInterfaces
= std::set
<std::string
>;
20 // A map of allowed applications to allowed interface sets. See shell.mojom for
22 using CapabilityFilter
= std::map
<std::string
, AllowedInterfaces
>;
24 // Returns a capability filter that allows an application to connect to any
25 // other application and any service exposed by other applications.
26 CapabilityFilter
GetPermissiveCapabilityFilter();
28 // Returns the set of interfaces that an application instance with |filter| is
29 // allowed to see from an instance with |identity|.
30 AllowedInterfaces
GetAllowedInterfaces(const CapabilityFilter
& filter
,
31 const Identity
& identity
);
37 #endif // MOJO_SHELL_CAPABILITY_FILTER_H_