Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Side by Side Diff: chrome/browser/extensions/api/serial/serial_api.h

Issue 311313002: Convert SerialDeviceInfo to a Mojo struct. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/serial/serial_api.cc » ('j') | device/serial/serial_device_enumerator_linux.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698