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

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

Issue 1825273002: Add more out of line copy ctors for complex classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/edk/system/request_context.cc ('k') | mojo/shell/public/cpp/lib/capabilities.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MOJO_SHELL_PUBLIC_CPP_CAPABILITIES_H_ 5 #ifndef MOJO_SHELL_PUBLIC_CPP_CAPABILITIES_H_
6 #define MOJO_SHELL_PUBLIC_CPP_CAPABILITIES_H_ 6 #define MOJO_SHELL_PUBLIC_CPP_CAPABILITIES_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
11 11
12 #include "mojo/shell/public/interfaces/shell_resolver.mojom.h" 12 #include "mojo/shell/public/interfaces/shell_resolver.mojom.h"
13 13
14 namespace mojo { 14 namespace mojo {
15 using Class = std::string; 15 using Class = std::string;
16 using Classes = std::set<std::string>; 16 using Classes = std::set<std::string>;
17 using Interface = std::string; 17 using Interface = std::string;
18 using Interfaces = std::set<std::string>; 18 using Interfaces = std::set<std::string>;
19 using Name = std::string; 19 using Name = std::string;
20 20
21 // See comments in mojo/shell/public/interfaces/capabilities.mojom for a 21 // See comments in mojo/shell/public/interfaces/capabilities.mojom for a
22 // description of CapabilityRequest and CapabilitySpec. 22 // description of CapabilityRequest and CapabilitySpec.
23 23
24 struct CapabilityRequest { 24 struct CapabilityRequest {
25 CapabilityRequest(); 25 CapabilityRequest();
26 CapabilityRequest(const CapabilityRequest& other);
26 ~CapabilityRequest(); 27 ~CapabilityRequest();
27 bool operator==(const CapabilityRequest& other) const; 28 bool operator==(const CapabilityRequest& other) const;
28 Classes classes; 29 Classes classes;
29 Interfaces interfaces; 30 Interfaces interfaces;
30 }; 31 };
31 32
32 struct CapabilitySpec { 33 struct CapabilitySpec {
33 CapabilitySpec(); 34 CapabilitySpec();
35 CapabilitySpec(const CapabilitySpec& other);
34 ~CapabilitySpec(); 36 ~CapabilitySpec();
35 bool operator==(const CapabilitySpec& other) const; 37 bool operator==(const CapabilitySpec& other) const;
36 std::map<Class, Interfaces> provided; 38 std::map<Class, Interfaces> provided;
37 std::map<Name, CapabilityRequest> required; 39 std::map<Name, CapabilityRequest> required;
38 }; 40 };
39 41
40 template <> 42 template <>
41 struct TypeConverter<shell::mojom::CapabilitySpecPtr, CapabilitySpec> { 43 struct TypeConverter<shell::mojom::CapabilitySpecPtr, CapabilitySpec> {
42 static shell::mojom::CapabilitySpecPtr Convert( 44 static shell::mojom::CapabilitySpecPtr Convert(
43 const CapabilitySpec& input); 45 const CapabilitySpec& input);
(...skipping 12 matching lines...) Expand all
56 }; 58 };
57 template <> 59 template <>
58 struct TypeConverter<CapabilityRequest, 60 struct TypeConverter<CapabilityRequest,
59 shell::mojom::CapabilityRequestPtr> { 61 shell::mojom::CapabilityRequestPtr> {
60 static CapabilityRequest Convert( 62 static CapabilityRequest Convert(
61 const shell::mojom::CapabilityRequestPtr& input); 63 const shell::mojom::CapabilityRequestPtr& input);
62 }; 64 };
63 } // namespace mojo 65 } // namespace mojo
64 66
65 #endif // MOJO_SHELL_PUBLIC_CPP_CAPABILITIES_H_ 67 #endif // MOJO_SHELL_PUBLIC_CPP_CAPABILITIES_H_
OLDNEW
« no previous file with comments | « mojo/edk/system/request_context.cc ('k') | mojo/shell/public/cpp/lib/capabilities.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698