| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_REQUEST_H_ | 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_REQUEST_H_ |
| 6 #define MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_REQUEST_H_ | 6 #define MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_REQUEST_H_ |
| 7 | 7 |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| 11 #include "base/thread_task_runner_handle.h" | 11 #include "base/threading/thread_task_runner_handle.h" |
| 12 #include "mojo/public/cpp/bindings/interface_ptr.h" | 12 #include "mojo/public/cpp/bindings/interface_ptr.h" |
| 13 | 13 |
| 14 namespace mojo { | 14 namespace mojo { |
| 15 | 15 |
| 16 // Represents a request from a remote client for an implementation of Interface | 16 // Represents a request from a remote client for an implementation of Interface |
| 17 // over a specified message pipe. The implementor of the interface should | 17 // over a specified message pipe. The implementor of the interface should |
| 18 // remove the message pipe by calling PassMessagePipe() and bind it to the | 18 // remove the message pipe by calling PassMessagePipe() and bind it to the |
| 19 // implementation. If this is not done, the InterfaceRequest will automatically | 19 // implementation. If this is not done, the InterfaceRequest will automatically |
| 20 // close the pipe on destruction. Can also represent the absence of a request | 20 // close the pipe on destruction. Can also represent the absence of a request |
| 21 // if the client did not provide a message pipe. | 21 // if the client did not provide a message pipe. |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 bool FuseInterface(InterfaceRequest<Interface> request, | 129 bool FuseInterface(InterfaceRequest<Interface> request, |
| 130 InterfacePtrInfo<Interface> proxy_info) { | 130 InterfacePtrInfo<Interface> proxy_info) { |
| 131 MojoResult result = FuseMessagePipes(request.PassMessagePipe(), | 131 MojoResult result = FuseMessagePipes(request.PassMessagePipe(), |
| 132 proxy_info.PassHandle()); | 132 proxy_info.PassHandle()); |
| 133 return result == MOJO_RESULT_OK; | 133 return result == MOJO_RESULT_OK; |
| 134 } | 134 } |
| 135 | 135 |
| 136 } // namespace mojo | 136 } // namespace mojo |
| 137 | 137 |
| 138 #endif // MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_REQUEST_H_ | 138 #endif // MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_REQUEST_H_ |
| OLD | NEW |