OLD | NEW |
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 #include "mojo/shell/public/cpp/capabilities.h" | 5 #include "mojo/shell/public/cpp/capabilities.h" |
6 | 6 |
7 namespace mojo { | 7 namespace mojo { |
8 | 8 |
9 CapabilityRequest::CapabilityRequest() {} | 9 CapabilityRequest::CapabilityRequest() {} |
| 10 CapabilityRequest::CapabilityRequest(const CapabilityRequest& other) = default; |
10 CapabilityRequest::~CapabilityRequest() {} | 11 CapabilityRequest::~CapabilityRequest() {} |
11 | 12 |
12 bool CapabilityRequest::operator==(const CapabilityRequest& other) const { | 13 bool CapabilityRequest::operator==(const CapabilityRequest& other) const { |
13 return other.classes == classes && other.interfaces == interfaces; | 14 return other.classes == classes && other.interfaces == interfaces; |
14 } | 15 } |
15 | 16 |
16 CapabilitySpec::CapabilitySpec() {} | 17 CapabilitySpec::CapabilitySpec() {} |
| 18 CapabilitySpec::CapabilitySpec(const CapabilitySpec& other) = default; |
17 CapabilitySpec::~CapabilitySpec() {} | 19 CapabilitySpec::~CapabilitySpec() {} |
18 | 20 |
19 bool CapabilitySpec::operator==(const CapabilitySpec& other) const { | 21 bool CapabilitySpec::operator==(const CapabilitySpec& other) const { |
20 return other.provided == provided && other.required == required; | 22 return other.provided == provided && other.required == required; |
21 } | 23 } |
22 | 24 |
23 // static | 25 // static |
24 shell::mojom::CapabilitySpecPtr | 26 shell::mojom::CapabilitySpecPtr |
25 TypeConverter<shell::mojom::CapabilitySpecPtr, CapabilitySpec>::Convert( | 27 TypeConverter<shell::mojom::CapabilitySpecPtr, CapabilitySpec>::Convert( |
26 const CapabilitySpec& input) { | 28 const CapabilitySpec& input) { |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 TypeConverter<CapabilityRequest, | 63 TypeConverter<CapabilityRequest, |
62 shell::mojom::CapabilityRequestPtr>::Convert( | 64 shell::mojom::CapabilityRequestPtr>::Convert( |
63 const shell::mojom::CapabilityRequestPtr& input) { | 65 const shell::mojom::CapabilityRequestPtr& input) { |
64 CapabilityRequest request; | 66 CapabilityRequest request; |
65 request.classes = input->classes.To<std::set<std::string>>(); | 67 request.classes = input->classes.To<std::set<std::string>>(); |
66 request.interfaces = input->interfaces.To<std::set<std::string>>(); | 68 request.interfaces = input->interfaces.To<std::set<std::string>>(); |
67 return request; | 69 return request; |
68 } | 70 } |
69 | 71 |
70 } // namespace mojo | 72 } // namespace mojo |
OLD | NEW |