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

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

Issue 2259283003: Mojo C++ bindings: share DataView class between chromium and blink variants. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@92_change_traits_param
Patch Set: . Created 4 years, 3 months 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/pipe_control_message_handler.h" 5 #include "mojo/public/cpp/bindings/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/serialization.h" 9 #include "mojo/public/cpp/bindings/lib/serialization.h"
10 #include "mojo/public/cpp/bindings/lib/validation_context.h" 10 #include "mojo/public/cpp/bindings/lib/validation_context.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 return false; 57 return false;
58 } 58 }
59 59
60 bool PipeControlMessageHandler::RunOrClosePipe(Message* message) { 60 bool PipeControlMessageHandler::RunOrClosePipe(Message* message) {
61 pipe_control::internal::RunOrClosePipeMessageParams_Data* params = 61 pipe_control::internal::RunOrClosePipeMessageParams_Data* params =
62 reinterpret_cast< 62 reinterpret_cast<
63 pipe_control::internal::RunOrClosePipeMessageParams_Data*>( 63 pipe_control::internal::RunOrClosePipeMessageParams_Data*>(
64 message->mutable_payload()); 64 message->mutable_payload());
65 pipe_control::RunOrClosePipeMessageParamsPtr params_ptr; 65 pipe_control::RunOrClosePipeMessageParamsPtr params_ptr;
66 internal::Deserialize<pipe_control::RunOrClosePipeMessageParamsPtr>( 66 internal::Deserialize<pipe_control::RunOrClosePipeMessageParamsDataView>(
67 params, &params_ptr, &context_); 67 params, &params_ptr, &context_);
68 68
69 if (params_ptr->input->is_peer_associated_endpoint_closed_event()) { 69 if (params_ptr->input->is_peer_associated_endpoint_closed_event()) {
70 return delegate_->OnPeerAssociatedEndpointClosed( 70 return delegate_->OnPeerAssociatedEndpointClosed(
71 params_ptr->input->get_peer_associated_endpoint_closed_event()->id); 71 params_ptr->input->get_peer_associated_endpoint_closed_event()->id);
72 } 72 }
73 if (params_ptr->input->is_associated_endpoint_closed_before_sent_event()) { 73 if (params_ptr->input->is_associated_endpoint_closed_before_sent_event()) {
74 return delegate_->OnAssociatedEndpointClosedBeforeSent( 74 return delegate_->OnAssociatedEndpointClosedBeforeSent(
75 params_ptr->input->get_associated_endpoint_closed_before_sent_event() 75 params_ptr->input->get_associated_endpoint_closed_before_sent_event()
76 ->id); 76 ->id);
77 } 77 }
78 78
79 DVLOG(1) << "Unsupported command in a RunOrClosePipe message pipe control " 79 DVLOG(1) << "Unsupported command in a RunOrClosePipe message pipe control "
80 << "message. Closing the pipe."; 80 << "message. Closing the pipe.";
81 return false; 81 return false;
82 } 82 }
83 83
84 } // namespace mojo 84 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698