OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "mojo/public/bindings/sample/generated/sample_service_stub.h" |
| 6 |
| 7 #include "mojo/public/bindings/sample/generated/sample_service_serialization.h" |
| 8 |
| 9 namespace sample { |
| 10 |
| 11 bool ServiceStub::Accept(mojo::Message* message) { |
| 12 switch (message->data->header.name) { |
| 13 case internal::kService_Frobinate_Name: { |
| 14 internal::Service_Frobinate_Params* params = |
| 15 reinterpret_cast<internal::Service_Frobinate_Params*>( |
| 16 message->data->payload); |
| 17 |
| 18 if (!mojo::internal::DecodePointersAndHandles(params, *message)) |
| 19 return false; |
| 20 |
| 21 Frobinate(params->foo(), params->baz(), params->port()); |
| 22 break; |
| 23 } |
| 24 } |
| 25 return true; |
| 26 } |
| 27 |
| 28 } // namespace sample |
OLD | NEW |