| 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 #ifndef MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_INTERFACE_REQUEST_H_ | 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_INTERFACE_REQUEST_H_ |
| 6 #define MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_INTERFACE_REQUEST_H_ | 6 #define MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_INTERFACE_REQUEST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/ptr_util.h" | 12 #include "base/memory/ptr_util.h" |
| 13 #include "base/threading/thread_task_runner_handle.h" | |
| 14 #include "mojo/public/cpp/bindings/interface_endpoint_client.h" | 13 #include "mojo/public/cpp/bindings/interface_endpoint_client.h" |
| 15 #include "mojo/public/cpp/bindings/lib/control_message_proxy.h" | 14 #include "mojo/public/cpp/bindings/lib/control_message_proxy.h" |
| 16 #include "mojo/public/cpp/bindings/message.h" | 15 #include "mojo/public/cpp/bindings/message.h" |
| 17 #include "mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h" | 16 #include "mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h" |
| 18 | 17 |
| 19 namespace mojo { | 18 namespace mojo { |
| 20 | 19 |
| 21 // AssociatedInterfaceRequest represents an associated interface request. It is | 20 // AssociatedInterfaceRequest represents an associated interface request. It is |
| 22 // similar to InterfaceRequest except that it doesn't own a message pipe handle. | 21 // similar to InterfaceRequest except that it doesn't own a message pipe handle. |
| 23 template <typename Interface> | 22 template <typename Interface> |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 AssociatedInterfaceRequest<Interface> MakeAssociatedRequest( | 85 AssociatedInterfaceRequest<Interface> MakeAssociatedRequest( |
| 87 ScopedInterfaceEndpointHandle handle) { | 86 ScopedInterfaceEndpointHandle handle) { |
| 88 AssociatedInterfaceRequest<Interface> request; | 87 AssociatedInterfaceRequest<Interface> request; |
| 89 request.Bind(std::move(handle)); | 88 request.Bind(std::move(handle)); |
| 90 return request; | 89 return request; |
| 91 } | 90 } |
| 92 | 91 |
| 93 } // namespace mojo | 92 } // namespace mojo |
| 94 | 93 |
| 95 #endif // MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_INTERFACE_REQUEST_H_ | 94 #endif // MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_INTERFACE_REQUEST_H_ |
| OLD | NEW |