| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/pipe_control_message_proxy.h" | 5 #include "mojo/public/cpp/bindings/pipe_control_message_proxy.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 size_t size = | 27 size_t size = |
| 28 internal::PrepareToSerialize< | 28 internal::PrepareToSerialize< |
| 29 pipe_control::RunOrClosePipeMessageParamsPtr>(params_ptr, context); | 29 pipe_control::RunOrClosePipeMessageParamsPtr>(params_ptr, context); |
| 30 internal::MessageBuilder builder(pipe_control::kRunOrClosePipeMessageId, | 30 internal::MessageBuilder builder(pipe_control::kRunOrClosePipeMessageId, |
| 31 size); | 31 size); |
| 32 | 32 |
| 33 pipe_control::internal::RunOrClosePipeMessageParams_Data* params = nullptr; | 33 pipe_control::internal::RunOrClosePipeMessageParams_Data* params = nullptr; |
| 34 internal::Serialize<pipe_control::RunOrClosePipeMessageParamsPtr>( | 34 internal::Serialize<pipe_control::RunOrClosePipeMessageParamsPtr>( |
| 35 params_ptr, builder.buffer(), ¶ms, context); | 35 params_ptr, builder.buffer(), ¶ms, context); |
| 36 params->EncodePointers(); | |
| 37 builder.message()->set_interface_id(kInvalidInterfaceId); | 36 builder.message()->set_interface_id(kInvalidInterfaceId); |
| 38 bool ok = receiver->Accept(builder.message()); | 37 bool ok = receiver->Accept(builder.message()); |
| 39 // This return value may be ignored as !ok implies the underlying message pipe | 38 // This return value may be ignored as !ok implies the underlying message pipe |
| 40 // has encountered an error, which will be visible through other means. | 39 // has encountered an error, which will be visible through other means. |
| 41 ALLOW_UNUSED_LOCAL(ok); | 40 ALLOW_UNUSED_LOCAL(ok); |
| 42 } | 41 } |
| 43 | 42 |
| 44 } // namespace | 43 } // namespace |
| 45 | 44 |
| 46 PipeControlMessageProxy::PipeControlMessageProxy(MessageReceiver* receiver) | 45 PipeControlMessageProxy::PipeControlMessageProxy(MessageReceiver* receiver) |
| (...skipping 19 matching lines...) Expand all Loading... |
| 66 event->id = id; | 65 event->id = id; |
| 67 | 66 |
| 68 pipe_control::RunOrClosePipeInputPtr input( | 67 pipe_control::RunOrClosePipeInputPtr input( |
| 69 pipe_control::RunOrClosePipeInput::New()); | 68 pipe_control::RunOrClosePipeInput::New()); |
| 70 input->set_associated_endpoint_closed_before_sent_event(std::move(event)); | 69 input->set_associated_endpoint_closed_before_sent_event(std::move(event)); |
| 71 | 70 |
| 72 SendRunOrClosePipeMessage(receiver_, std::move(input), &context_); | 71 SendRunOrClosePipeMessage(receiver_, std::move(input), &context_); |
| 73 } | 72 } |
| 74 | 73 |
| 75 } // namespace mojo | 74 } // namespace mojo |
| OLD | NEW |