| 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_LIB_MULTIPLEX_ROUTER_H_ | 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_MULTIPLEX_ROUTER_H_ |
| 6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_MULTIPLEX_ROUTER_H_ | 6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_MULTIPLEX_ROUTER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <deque> | 10 #include <deque> |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 | 72 |
| 73 // If |set_interface_id_namespace_bit| is true, the interface IDs generated by | 73 // If |set_interface_id_namespace_bit| is true, the interface IDs generated by |
| 74 // this router will have the highest bit set. | 74 // this router will have the highest bit set. |
| 75 MultiplexRouter(ScopedMessagePipeHandle message_pipe, | 75 MultiplexRouter(ScopedMessagePipeHandle message_pipe, |
| 76 Config config, | 76 Config config, |
| 77 bool set_interface_id_namespace_bit, | 77 bool set_interface_id_namespace_bit, |
| 78 scoped_refptr<base::SingleThreadTaskRunner> runner); | 78 scoped_refptr<base::SingleThreadTaskRunner> runner); |
| 79 | 79 |
| 80 // Sets the master interface name for this router. Only used when reporting | 80 // Sets the master interface name for this router. Only used when reporting |
| 81 // message header or control message validation errors. | 81 // message header or control message validation errors. |
| 82 void SetMasterInterfaceName(const std::string& name); | 82 // |name| must be a string literal. |
| 83 void SetMasterInterfaceName(const char* name); |
| 83 | 84 |
| 84 // --------------------------------------------------------------------------- | 85 // --------------------------------------------------------------------------- |
| 85 // The following public methods are safe to call from any threads. | 86 // The following public methods are safe to call from any threads. |
| 86 | 87 |
| 87 // AssociatedGroupController implementation: | 88 // AssociatedGroupController implementation: |
| 88 void CreateEndpointHandlePair( | 89 void CreateEndpointHandlePair( |
| 89 ScopedInterfaceEndpointHandle* local_endpoint, | 90 ScopedInterfaceEndpointHandle* local_endpoint, |
| 90 ScopedInterfaceEndpointHandle* remote_endpoint) override; | 91 ScopedInterfaceEndpointHandle* remote_endpoint) override; |
| 91 ScopedInterfaceEndpointHandle CreateLocalEndpointHandle( | 92 ScopedInterfaceEndpointHandle CreateLocalEndpointHandle( |
| 92 InterfaceId id) override; | 93 InterfaceId id) override; |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 | 266 |
| 266 bool testing_mode_; | 267 bool testing_mode_; |
| 267 | 268 |
| 268 DISALLOW_COPY_AND_ASSIGN(MultiplexRouter); | 269 DISALLOW_COPY_AND_ASSIGN(MultiplexRouter); |
| 269 }; | 270 }; |
| 270 | 271 |
| 271 } // namespace internal | 272 } // namespace internal |
| 272 } // namespace mojo | 273 } // namespace mojo |
| 273 | 274 |
| 274 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_MULTIPLEX_ROUTER_H_ | 275 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_MULTIPLEX_ROUTER_H_ |
| OLD | NEW |