| 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 TOOLS_BATTOR_AGENT_BATTOR_CONNECTION_IMPL_H_ | 5 #ifndef TOOLS_BATTOR_AGENT_BATTOR_CONNECTION_IMPL_H_ |
| 6 #define TOOLS_BATTOR_AGENT_BATTOR_CONNECTION_IMPL_H_ | 6 #define TOOLS_BATTOR_AGENT_BATTOR_CONNECTION_IMPL_H_ |
| 7 | 7 |
| 8 #include <fstream> |
| 8 #include <vector> | 9 #include <vector> |
| 9 | 10 |
| 10 #include "base/callback_forward.h" | 11 #include "base/callback_forward.h" |
| 11 #include "base/macros.h" | 12 #include "base/macros.h" |
| 12 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 13 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 14 #include "device/serial/serial.mojom.h" | 15 #include "device/serial/serial.mojom.h" |
| 15 #include "tools/battor_agent/battor_connection.h" | 16 #include "tools/battor_agent/battor_connection.h" |
| 16 #include "tools/battor_agent/battor_error.h" | 17 #include "tools/battor_agent/battor_error.h" |
| 17 #include "tools/battor_agent/battor_protocol_types.h" | 18 #include "tools/battor_agent/battor_protocol_types.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 // The type of message we're looking for in the pending read. | 87 // The type of message we're looking for in the pending read. |
| 87 BattOrMessageType pending_read_message_type_; | 88 BattOrMessageType pending_read_message_type_; |
| 88 | 89 |
| 89 // The total number of bytes that we're expecting to send. | 90 // The total number of bytes that we're expecting to send. |
| 90 size_t pending_write_length_; | 91 size_t pending_write_length_; |
| 91 | 92 |
| 92 // Threads needed for serial communication. | 93 // Threads needed for serial communication. |
| 93 scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner_; | 94 scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner_; |
| 94 scoped_refptr<base::SingleThreadTaskRunner> ui_thread_task_runner_; | 95 scoped_refptr<base::SingleThreadTaskRunner> ui_thread_task_runner_; |
| 95 | 96 |
| 97 std::fstream serial_log_; |
| 98 |
| 96 DISALLOW_COPY_AND_ASSIGN(BattOrConnectionImpl); | 99 DISALLOW_COPY_AND_ASSIGN(BattOrConnectionImpl); |
| 97 }; | 100 }; |
| 98 | 101 |
| 99 } // namespace battor | 102 } // namespace battor |
| 100 | 103 |
| 101 #endif // TOOLS_BATTOR_AGENT_BATTOR_CONNECTION_IMPL_H_ | 104 #endif // TOOLS_BATTOR_AGENT_BATTOR_CONNECTION_IMPL_H_ |
| OLD | NEW |