OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 CHROME_BROWSER_EXTENSIONS_API_SERIAL_SERIAL_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_SERIAL_SERIAL_API_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_SERIAL_SERIAL_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_SERIAL_SERIAL_API_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "chrome/common/extensions/api/serial.h" | 11 #include "chrome/common/extensions/api/serial.h" |
| 12 #include "device/serial/serial.mojom.h" |
12 #include "extensions/browser/api/api_resource_manager.h" | 13 #include "extensions/browser/api/api_resource_manager.h" |
13 #include "extensions/browser/api/async_api_function.h" | 14 #include "extensions/browser/api/async_api_function.h" |
14 | 15 |
15 namespace extensions { | 16 namespace extensions { |
16 | 17 |
17 class SerialConnection; | 18 class SerialConnection; |
18 | 19 |
19 namespace api { | 20 namespace api { |
20 | 21 |
21 class SerialEventDispatcher; | 22 class SerialEventDispatcher; |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 virtual void Work() OVERRIDE; | 237 virtual void Work() OVERRIDE; |
237 | 238 |
238 private: | 239 private: |
239 scoped_ptr<serial::SetControlSignals::Params> params_; | 240 scoped_ptr<serial::SetControlSignals::Params> params_; |
240 }; | 241 }; |
241 | 242 |
242 } // namespace api | 243 } // namespace api |
243 | 244 |
244 } // namespace extensions | 245 } // namespace extensions |
245 | 246 |
| 247 namespace mojo { |
| 248 |
| 249 template <> |
| 250 class TypeConverter<device::SerialDeviceInfoPtr, |
| 251 linked_ptr<extensions::api::serial::DeviceInfo> > { |
| 252 public: |
| 253 static linked_ptr<extensions::api::serial::DeviceInfo> ConvertTo( |
| 254 const device::SerialDeviceInfoPtr& input); |
| 255 }; |
| 256 |
| 257 } // namespace mojo |
| 258 |
246 #endif // CHROME_BROWSER_EXTENSIONS_API_SERIAL_SERIAL_API_H_ | 259 #endif // CHROME_BROWSER_EXTENSIONS_API_SERIAL_SERIAL_API_H_ |
OLD | NEW |