| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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_LIB_BINDINGS_SERIALIZATION_H_ | 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDINGS_SERIALIZATION_H_ |
| 6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDINGS_SERIALIZATION_H_ | 6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDINGS_SERIALIZATION_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 inline void AssociatedInterfaceDataToPtrInfo( | 105 inline void AssociatedInterfaceDataToPtrInfo( |
| 106 AssociatedInterface_Data* input, | 106 AssociatedInterface_Data* input, |
| 107 AssociatedInterfacePtrInfo<T>* output, | 107 AssociatedInterfacePtrInfo<T>* output, |
| 108 MultiplexRouter* router) { | 108 MultiplexRouter* router) { |
| 109 AssociatedInterfacePtrInfoHelper::SetHandle( | 109 AssociatedInterfacePtrInfoHelper::SetHandle( |
| 110 output, | 110 output, |
| 111 router->CreateLocalEndpointHandle(FetchAndReset(&input->interface_id))); | 111 router->CreateLocalEndpointHandle(FetchAndReset(&input->interface_id))); |
| 112 output->set_version(input->version); | 112 output->set_version(input->version); |
| 113 } | 113 } |
| 114 | 114 |
| 115 class WTFStringContext { |
| 116 public: |
| 117 virtual ~WTFStringContext() {} |
| 118 }; |
| 119 |
| 115 // Context information for serialization/deserialization routines. | 120 // Context information for serialization/deserialization routines. |
| 116 struct SerializationContext { | 121 struct SerializationContext { |
| 117 SerializationContext(); | 122 SerializationContext(); |
| 118 explicit SerializationContext(scoped_refptr<MultiplexRouter> in_router); | 123 explicit SerializationContext(scoped_refptr<MultiplexRouter> in_router); |
| 119 | 124 |
| 120 ~SerializationContext(); | 125 ~SerializationContext(); |
| 121 | 126 |
| 122 // Used to serialize/deserialize associated interface pointers and requests. | 127 // Used to serialize/deserialize associated interface pointers and requests. |
| 123 scoped_refptr<MultiplexRouter> router; | 128 scoped_refptr<MultiplexRouter> router; |
| 129 |
| 130 scoped_ptr<WTFStringContext> wtf_string_context; |
| 124 }; | 131 }; |
| 125 | 132 |
| 126 } // namespace internal | 133 } // namespace internal |
| 127 } // namespace mojo | 134 } // namespace mojo |
| 128 | 135 |
| 129 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDINGS_SERIALIZATION_H_ | 136 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDINGS_SERIALIZATION_H_ |
| OLD | NEW |