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

Side by Side Diff: mojo/public/cpp/bindings/lib/pipe_control_message_handler.cc

Issue 1475813002: Mojo C++ bindings: support passing associated interface pointers/requests in method parameter lists… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@25_use_multiplex_router
Patch Set: Created 5 years 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
OLDNEW
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/lib/pipe_control_message_handler.h" 5 #include "mojo/public/cpp/bindings/lib/pipe_control_message_handler.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "mojo/public/cpp/bindings/lib/message_builder.h" 8 #include "mojo/public/cpp/bindings/lib/message_builder.h"
9 #include "mojo/public/cpp/bindings/lib/pipe_control_message_handler_delegate.h" 9 #include "mojo/public/cpp/bindings/lib/pipe_control_message_handler_delegate.h"
10 #include "mojo/public/cpp/bindings/lib/validation_util.h" 10 #include "mojo/public/cpp/bindings/lib/validation_util.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 } 47 }
48 48
49 bool PipeControlMessageHandler::RunOrClosePipe(Message* message) { 49 bool PipeControlMessageHandler::RunOrClosePipe(Message* message) {
50 pipe_control::internal::RunOrClosePipeMessageParams_Data* params = 50 pipe_control::internal::RunOrClosePipeMessageParams_Data* params =
51 reinterpret_cast< 51 reinterpret_cast<
52 pipe_control::internal::RunOrClosePipeMessageParams_Data*>( 52 pipe_control::internal::RunOrClosePipeMessageParams_Data*>(
53 message->mutable_payload()); 53 message->mutable_payload());
54 params->DecodePointersAndHandles(message->mutable_handles()); 54 params->DecodePointersAndHandles(message->mutable_handles());
55 55
56 pipe_control::RunOrClosePipeMessageParamsPtr params_ptr; 56 pipe_control::RunOrClosePipeMessageParamsPtr params_ptr;
57 Deserialize_(params, &params_ptr); 57 Deserialize_(params, &params_ptr, nullptr);
58 58
59 if (params_ptr->input->is_peer_associated_endpoint_closed_event()) { 59 if (params_ptr->input->is_peer_associated_endpoint_closed_event()) {
60 return delegate_->OnPeerAssociatedEndpointClosed( 60 return delegate_->OnPeerAssociatedEndpointClosed(
61 params_ptr->input->get_peer_associated_endpoint_closed_event()->id); 61 params_ptr->input->get_peer_associated_endpoint_closed_event()->id);
62 } 62 }
63 if (params_ptr->input->is_associated_endpoint_closed_before_sent_event()) { 63 if (params_ptr->input->is_associated_endpoint_closed_before_sent_event()) {
64 return delegate_->OnAssociatedEndpointClosedBeforeSent( 64 return delegate_->OnAssociatedEndpointClosedBeforeSent(
65 params_ptr->input->get_associated_endpoint_closed_before_sent_event() 65 params_ptr->input->get_associated_endpoint_closed_before_sent_event()
66 ->id); 66 ->id);
67 } 67 }
68 68
69 DVLOG(1) << "Unsupported command in a RunOrClosePipe message pipe control " 69 DVLOG(1) << "Unsupported command in a RunOrClosePipe message pipe control "
70 << "message. Closing the pipe."; 70 << "message. Closing the pipe.";
71 return false; 71 return false;
72 } 72 }
73 73
74 } // namespace internal 74 } // namespace internal
75 } // namespace mojo 75 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/lib/map_serialization.h ('k') | mojo/public/cpp/bindings/lib/string_serialization.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698