| Index: device/serial/serial_connection.h
|
| diff --git a/device/serial/serial_connection.h b/device/serial/serial_connection.h
|
| index 31d5fc3a894cbdac3a2b90e43d9000b31c9d155c..807e173700f6ae52870490b531a243376b7af98a 100644
|
| --- a/device/serial/serial_connection.h
|
| +++ b/device/serial/serial_connection.h
|
| @@ -6,16 +6,23 @@
|
| #define DEVICE_SERIAL_SERIAL_CONNECTION_H_
|
|
|
| #include "base/memory/ref_counted.h"
|
| +#include "base/memory/scoped_ptr.h"
|
| #include "device/serial/serial.mojom.h"
|
| #include "mojo/public/cpp/bindings/interface_impl.h"
|
|
|
| namespace device {
|
|
|
| +class DataSinkReceiver;
|
| +class DataSourceSender;
|
| +class ReadOnlyBuffer;
|
| class SerialIoHandler;
|
| +class WritableBuffer;
|
|
|
| class SerialConnection : public mojo::InterfaceImpl<serial::Connection> {
|
| public:
|
| - explicit SerialConnection(scoped_refptr<SerialIoHandler> io_handler);
|
| + SerialConnection(scoped_refptr<SerialIoHandler> io_handler,
|
| + mojo::InterfaceRequest<serial::DataSink> sink,
|
| + mojo::InterfaceRequest<serial::DataSource> source);
|
| virtual ~SerialConnection();
|
|
|
| // mojo::InterfaceImpl<serial::Connection> overrides.
|
| @@ -31,7 +38,13 @@ class SerialConnection : public mojo::InterfaceImpl<serial::Connection> {
|
| virtual void Flush(const mojo::Callback<void(bool)>& callback) OVERRIDE;
|
|
|
| private:
|
| + void OnSendPipeReady(scoped_ptr<ReadOnlyBuffer> buffer);
|
| + void OnSendCancelled(int32_t error);
|
| + void OnReceivePipeReady(scoped_ptr<WritableBuffer> buffer);
|
| +
|
| scoped_refptr<SerialIoHandler> io_handler_;
|
| + scoped_refptr<DataSinkReceiver> receiver_;
|
| + scoped_refptr<DataSourceSender> sender_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(SerialConnection);
|
| };
|
|
|