OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef DEVICE_SERIAL_SERIAL_SERVICE_IMPL_H_ |
| 6 #define DEVICE_SERIAL_SERIAL_SERVICE_IMPL_H_ |
| 7 |
| 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/message_loop/message_loop_proxy.h" |
| 10 #include "device/serial/serial.mojom.h" |
| 11 #include "device/serial/serial_device_enumerator.h" |
| 12 #include "mojo/public/cpp/bindings/interface_impl.h" |
| 13 |
| 14 namespace device { |
| 15 |
| 16 class SerialServiceImpl : public mojo::InterfaceImpl<serial::SerialService> { |
| 17 public: |
| 18 SerialServiceImpl(); |
| 19 virtual ~SerialServiceImpl(); |
| 20 |
| 21 static void Create(mojo::InterfaceRequest<serial::SerialService> request); |
| 22 static void CreateOnMessageLoop( |
| 23 scoped_refptr<base::MessageLoopProxy> message_loop, |
| 24 mojo::InterfaceRequest<serial::SerialService> request); |
| 25 |
| 26 // mojo::InterfaceImpl<SerialService> overrides. |
| 27 virtual void GetDevices(const mojo::Callback< |
| 28 void(mojo::Array<serial::DeviceInfoPtr>)>& callback) OVERRIDE; |
| 29 virtual void OnConnectionError() OVERRIDE; |
| 30 |
| 31 private: |
| 32 scoped_ptr<SerialDeviceEnumerator> device_enumerator_; |
| 33 }; |
| 34 |
| 35 } // namespace device |
| 36 |
| 37 #endif // DEVICE_SERIAL_SERIAL_SERVICE_IMPL_H_ |
OLD | NEW |