OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/message.h" | 5 #include "mojo/public/cpp/bindings/message.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <stdlib.h> | 9 #include <stdlib.h> |
10 | 10 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 } | 107 } |
108 | 108 |
109 void Message::CloseHandles() { | 109 void Message::CloseHandles() { |
110 for (std::vector<Handle>::iterator it = handles_.begin(); | 110 for (std::vector<Handle>::iterator it = handles_.begin(); |
111 it != handles_.end(); ++it) { | 111 it != handles_.end(); ++it) { |
112 if (it->is_valid()) | 112 if (it->is_valid()) |
113 CloseRaw(*it); | 113 CloseRaw(*it); |
114 } | 114 } |
115 } | 115 } |
116 | 116 |
| 117 PassThroughFilter::PassThroughFilter() {} |
| 118 |
| 119 PassThroughFilter::~PassThroughFilter() {} |
| 120 |
| 121 bool PassThroughFilter::Accept(Message* message) { return true; } |
| 122 |
117 SyncMessageResponseContext::SyncMessageResponseContext() | 123 SyncMessageResponseContext::SyncMessageResponseContext() |
118 : outer_context_(current()) { | 124 : outer_context_(current()) { |
119 g_tls_sync_response_context.Get().Set(this); | 125 g_tls_sync_response_context.Get().Set(this); |
120 } | 126 } |
121 | 127 |
122 SyncMessageResponseContext::~SyncMessageResponseContext() { | 128 SyncMessageResponseContext::~SyncMessageResponseContext() { |
123 DCHECK_EQ(current(), this); | 129 DCHECK_EQ(current(), this); |
124 g_tls_sync_response_context.Get().Set(outer_context_); | 130 g_tls_sync_response_context.Get().Set(outer_context_); |
125 } | 131 } |
126 | 132 |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 // static | 222 // static |
217 void SyncMessageResponseSetup::SetCurrentSyncResponseMessage(Message* message) { | 223 void SyncMessageResponseSetup::SetCurrentSyncResponseMessage(Message* message) { |
218 SyncMessageResponseContext* context = SyncMessageResponseContext::current(); | 224 SyncMessageResponseContext* context = SyncMessageResponseContext::current(); |
219 if (context) | 225 if (context) |
220 context->response_ = std::move(*message); | 226 context->response_ = std::move(*message); |
221 } | 227 } |
222 | 228 |
223 } // namespace internal | 229 } // namespace internal |
224 | 230 |
225 } // namespace mojo | 231 } // namespace mojo |
OLD | NEW |