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/public/cpp/bindings/lib/serialization_context.h" | 5 #include "mojo/public/cpp/bindings/lib/serialization_context.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "mojo/public/cpp/bindings/lib/multiplex_router.h" | 10 #include "mojo/public/cpp/bindings/associated_group_controller.h" |
11 #include "mojo/public/cpp/system/core.h" | 11 #include "mojo/public/cpp/system/core.h" |
12 | 12 |
13 namespace mojo { | 13 namespace mojo { |
14 namespace internal { | 14 namespace internal { |
15 | 15 |
16 SerializedHandleVector::SerializedHandleVector() {} | 16 SerializedHandleVector::SerializedHandleVector() {} |
17 | 17 |
18 SerializedHandleVector::~SerializedHandleVector() { | 18 SerializedHandleVector::~SerializedHandleVector() { |
19 for (auto handle : handles_) { | 19 for (auto handle : handles_) { |
20 if (handle.is_valid()) { | 20 if (handle.is_valid()) { |
(...skipping 23 matching lines...) Expand all Loading... |
44 return FetchAndReset(&handles_[encoded_handle.value]); | 44 return FetchAndReset(&handles_[encoded_handle.value]); |
45 } | 45 } |
46 | 46 |
47 void SerializedHandleVector::Swap(std::vector<mojo::Handle>* other) { | 47 void SerializedHandleVector::Swap(std::vector<mojo::Handle>* other) { |
48 handles_.swap(*other); | 48 handles_.swap(*other); |
49 } | 49 } |
50 | 50 |
51 SerializationContext::SerializationContext() {} | 51 SerializationContext::SerializationContext() {} |
52 | 52 |
53 SerializationContext::SerializationContext( | 53 SerializationContext::SerializationContext( |
54 scoped_refptr<MultiplexRouter> in_router) | 54 scoped_refptr<AssociatedGroupController> in_group_controller) |
55 : router(std::move(in_router)) {} | 55 : group_controller(std::move(in_group_controller)) {} |
56 | 56 |
57 SerializationContext::~SerializationContext() { | 57 SerializationContext::~SerializationContext() { |
58 DCHECK(!custom_contexts || custom_contexts->empty()); | 58 DCHECK(!custom_contexts || custom_contexts->empty()); |
59 } | 59 } |
60 | 60 |
61 } // namespace internal | 61 } // namespace internal |
62 } // namespace mojo | 62 } // namespace mojo |
OLD | NEW |