// Copyright 2016 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. #ifndef MOJO_SHELL_PUBLIC_CPP_CAPABILITIES_H_ #define MOJO_SHELL_PUBLIC_CPP_CAPABILITIES_H_ #include #include #include #include "mojo/shell/public/interfaces/shell_resolver.mojom.h" namespace mojo { using Class = std::string; using Classes = std::set; using Interface = std::string; using Interfaces = std::set; using Name = std::string; // See comments in mojo/shell/public/interfaces/capabilities.mojom for a // description of CapabilityRequest and CapabilitySpec. struct CapabilityRequest { CapabilityRequest(); ~CapabilityRequest(); bool operator==(const CapabilityRequest& other) const; Classes classes; Interfaces interfaces; }; struct CapabilitySpec { CapabilitySpec(); ~CapabilitySpec(); bool operator==(const CapabilitySpec& other) const; std::map provided; std::map required; }; template <> struct TypeConverter { static shell::mojom::CapabilitySpecPtr Convert( const CapabilitySpec& input); }; template <> struct TypeConverter { static CapabilitySpec Convert( const shell::mojom::CapabilitySpecPtr& input); }; template <> struct TypeConverter { static shell::mojom::CapabilityRequestPtr Convert( const CapabilityRequest& input); }; template <> struct TypeConverter { static CapabilityRequest Convert( const shell::mojom::CapabilityRequestPtr& input); }; } // namespace mojo #endif // MOJO_SHELL_PUBLIC_CPP_CAPABILITIES_H_