| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "device/serial/test_serial_io_handler.h" | 5 #include "device/serial/test_serial_io_handler.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "device/serial/serial.mojom.h" | 10 #include "device/serial/serial.mojom.h" |
| 11 | 11 |
| 12 namespace device { | 12 namespace device { |
| 13 | 13 |
| 14 TestSerialIoHandler::TestSerialIoHandler() | 14 TestSerialIoHandler::TestSerialIoHandler() |
| 15 : SerialIoHandler(NULL), | 15 : SerialIoHandler(NULL, NULL), |
| 16 opened_(false), | 16 opened_(false), |
| 17 dtr_(false), | 17 dtr_(false), |
| 18 rts_(false), | 18 rts_(false), |
| 19 flushes_(0) { | 19 flushes_(0) { |
| 20 } | 20 } |
| 21 | 21 |
| 22 scoped_refptr<SerialIoHandler> TestSerialIoHandler::Create() { | 22 scoped_refptr<SerialIoHandler> TestSerialIoHandler::Create() { |
| 23 return scoped_refptr<SerialIoHandler>(new TestSerialIoHandler); | 23 return scoped_refptr<SerialIoHandler>(new TestSerialIoHandler); |
| 24 } | 24 } |
| 25 | 25 |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 dtr_ = signals.dtr; | 102 dtr_ = signals.dtr; |
| 103 if (signals.has_rts) | 103 if (signals.has_rts) |
| 104 rts_ = signals.rts; | 104 rts_ = signals.rts; |
| 105 return true; | 105 return true; |
| 106 } | 106 } |
| 107 | 107 |
| 108 TestSerialIoHandler::~TestSerialIoHandler() { | 108 TestSerialIoHandler::~TestSerialIoHandler() { |
| 109 } | 109 } |
| 110 | 110 |
| 111 } // namespace device | 111 } // namespace device |
| OLD | NEW |