| 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/serial_connection.h" | 5 #include "device/serial/serial_connection.h" |
| 6 | 6 |
| 7 #include "device/serial/serial_io_handler.h" | 7 #include "device/serial/serial_io_handler.h" |
| 8 | 8 |
| 9 namespace device { | 9 namespace device { |
| 10 | 10 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 | 35 |
| 36 void SerialConnection::GetControlSignals( | 36 void SerialConnection::GetControlSignals( |
| 37 const mojo::Callback<void(serial::DeviceControlSignalsPtr)>& callback) { | 37 const mojo::Callback<void(serial::DeviceControlSignalsPtr)>& callback) { |
| 38 callback.Run(io_handler_->GetControlSignals()); | 38 callback.Run(io_handler_->GetControlSignals()); |
| 39 } | 39 } |
| 40 | 40 |
| 41 void SerialConnection::Flush(const mojo::Callback<void(bool)>& callback) { | 41 void SerialConnection::Flush(const mojo::Callback<void(bool)>& callback) { |
| 42 callback.Run(io_handler_->Flush()); | 42 callback.Run(io_handler_->Flush()); |
| 43 } | 43 } |
| 44 | 44 |
| 45 void SerialConnection::OnConnectionError() { | |
| 46 delete this; | |
| 47 } | |
| 48 | |
| 49 } // namespace device | 45 } // namespace device |
| OLD | NEW |