| 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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 | 235 |
| 236 FilterChain filters_; | 236 FilterChain filters_; |
| 237 Connector connector_; | 237 Connector connector_; |
| 238 | 238 |
| 239 base::ThreadChecker thread_checker_; | 239 base::ThreadChecker thread_checker_; |
| 240 | 240 |
| 241 // Protects the following members. | 241 // Protects the following members. |
| 242 // Sets to nullptr in Config::SINGLE_INTERFACE* mode. | 242 // Sets to nullptr in Config::SINGLE_INTERFACE* mode. |
| 243 std::unique_ptr<base::Lock> lock_; | 243 std::unique_ptr<base::Lock> lock_; |
| 244 PipeControlMessageHandler control_message_handler_; | 244 PipeControlMessageHandler control_message_handler_; |
| 245 |
| 246 // NOTE: It is unsafe to call into this object while holding |lock_|. |
| 245 PipeControlMessageProxy control_message_proxy_; | 247 PipeControlMessageProxy control_message_proxy_; |
| 246 | 248 |
| 247 std::map<InterfaceId, scoped_refptr<InterfaceEndpoint>> endpoints_; | 249 std::map<InterfaceId, scoped_refptr<InterfaceEndpoint>> endpoints_; |
| 248 uint32_t next_interface_id_value_; | 250 uint32_t next_interface_id_value_; |
| 249 | 251 |
| 250 std::deque<std::unique_ptr<Task>> tasks_; | 252 std::deque<std::unique_ptr<Task>> tasks_; |
| 251 // It refers to tasks in |tasks_| and doesn't own any of them. | 253 // It refers to tasks in |tasks_| and doesn't own any of them. |
| 252 std::map<InterfaceId, std::deque<Task*>> sync_message_tasks_; | 254 std::map<InterfaceId, std::deque<Task*>> sync_message_tasks_; |
| 253 | 255 |
| 254 bool posted_to_process_tasks_; | 256 bool posted_to_process_tasks_; |
| 255 scoped_refptr<base::SingleThreadTaskRunner> posted_to_task_runner_; | 257 scoped_refptr<base::SingleThreadTaskRunner> posted_to_task_runner_; |
| 256 | 258 |
| 257 bool encountered_error_; | 259 bool encountered_error_; |
| 258 | 260 |
| 259 bool paused_; | 261 bool paused_; |
| 260 | 262 |
| 261 bool testing_mode_; | 263 bool testing_mode_; |
| 262 | 264 |
| 263 DISALLOW_COPY_AND_ASSIGN(MultiplexRouter); | 265 DISALLOW_COPY_AND_ASSIGN(MultiplexRouter); |
| 264 }; | 266 }; |
| 265 | 267 |
| 266 } // namespace internal | 268 } // namespace internal |
| 267 } // namespace mojo | 269 } // namespace mojo |
| 268 | 270 |
| 269 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_MULTIPLEX_ROUTER_H_ | 271 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_MULTIPLEX_ROUTER_H_ |
| OLD | NEW |