Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(200)

Side by Side Diff: mojo/shell/public/cpp/capabilities.h

Issue 1877753003: Move mojo\shell to services\shell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@62scan
Patch Set: . Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « mojo/shell/public/cpp/application_test_base.h ('k') | mojo/shell/public/cpp/connect.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 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
5 #ifndef MOJO_SHELL_PUBLIC_CPP_CAPABILITIES_H_
6 #define MOJO_SHELL_PUBLIC_CPP_CAPABILITIES_H_
7
8 #include <map>
9 #include <set>
10 #include <string>
11
12 #include "mojo/shell/public/interfaces/shell_resolver.mojom.h"
13
14 namespace mojo {
15 using Class = std::string;
16 using Classes = std::set<std::string>;
17 using Interface = std::string;
18 using Interfaces = std::set<std::string>;
19 using Name = std::string;
20
21 // See comments in mojo/shell/public/interfaces/capabilities.mojom for a
22 // description of CapabilityRequest and CapabilitySpec.
23
24 struct CapabilityRequest {
25 CapabilityRequest();
26 CapabilityRequest(const CapabilityRequest& other);
27 ~CapabilityRequest();
28 bool operator==(const CapabilityRequest& other) const;
29 bool operator<(const CapabilityRequest& other) const;
30 Classes classes;
31 Interfaces interfaces;
32 };
33
34 struct CapabilitySpec {
35 CapabilitySpec();
36 CapabilitySpec(const CapabilitySpec& other);
37 ~CapabilitySpec();
38 bool operator==(const CapabilitySpec& other) const;
39 bool operator<(const CapabilitySpec& other) const;
40 std::map<Class, Interfaces> provided;
41 std::map<Name, CapabilityRequest> required;
42 };
43
44 template <>
45 struct TypeConverter<shell::mojom::CapabilitySpecPtr, CapabilitySpec> {
46 static shell::mojom::CapabilitySpecPtr Convert(
47 const CapabilitySpec& input);
48 };
49 template <>
50 struct TypeConverter<CapabilitySpec, shell::mojom::CapabilitySpecPtr> {
51 static CapabilitySpec Convert(
52 const shell::mojom::CapabilitySpecPtr& input);
53 };
54
55 template <>
56 struct TypeConverter<shell::mojom::CapabilityRequestPtr,
57 CapabilityRequest> {
58 static shell::mojom::CapabilityRequestPtr Convert(
59 const CapabilityRequest& input);
60 };
61 template <>
62 struct TypeConverter<CapabilityRequest,
63 shell::mojom::CapabilityRequestPtr> {
64 static CapabilityRequest Convert(
65 const shell::mojom::CapabilityRequestPtr& input);
66 };
67 } // namespace mojo
68
69 #endif // MOJO_SHELL_PUBLIC_CPP_CAPABILITIES_H_
OLDNEW
« no previous file with comments | « mojo/shell/public/cpp/application_test_base.h ('k') | mojo/shell/public/cpp/connect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698