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

Side by Side Diff: chrome/common/extensions/api/serial.idl

Issue 158063002: Use udev for serial device enumeration on Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: doc nits Created 6 years, 10 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 // Use the <code>chrome.serial</code> API to read from and write to a device 5 // Use the <code>chrome.serial</code> API to read from and write to a device
6 // connected to a serial port. 6 // connected to a serial port.
7 namespace serial { 7 namespace serial {
8 8
9 dictionary DeviceInfo { 9 dictionary DeviceInfo {
10 // The device's system path. This should be passed as the <code>path</code> 10 // The device's system path. This should be passed as the <code>path</code>
11 // argument to <code>chrome.serial.connect</code> in order to connect to 11 // argument to <code>chrome.serial.connect</code> in order to connect to
12 // this device. 12 // this device.
13 DOMString path; 13 DOMString path;
14
15 // A PCI or USB vendor ID if one can be determined for the underlying
16 // device; zero otherwise. This field may only be present in Chrome 34 or
17 // higher.
18 long vendorId;
19
20 // A USB product ID if one can be determined for the underlying device;
21 // zero otherwise. This field may only be present in Chrome 34 or higher.
22 long productId;
23
24 // A human-readable display name for the underlying device if one can be
25 // queried from the host driver; empty otherwise. This field may only be
26 // present in Chrome 34 or higher.
27 DOMString displayName;
14 }; 28 };
15 29
16 callback GetDevicesCallback = void (DeviceInfo[] ports); 30 callback GetDevicesCallback = void (DeviceInfo[] ports);
17 31
18 enum DataBits { seven, eight }; 32 enum DataBits { seven, eight };
19 enum ParityBit { no, odd, even }; 33 enum ParityBit { no, odd, even };
20 enum StopBits { one, two }; 34 enum StopBits { one, two };
21 35
22 dictionary ConnectionOptions { 36 dictionary ConnectionOptions {
23 // Flag indicating whether or not the connection should be left open when 37 // Flag indicating whether or not the connection should be left open when
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 // |info| : Event data. 317 // |info| : Event data.
304 static void onReceive(ReceiveInfo info); 318 static void onReceive(ReceiveInfo info);
305 319
306 // Event raised when an error occurred while the runtime was waiting for 320 // Event raised when an error occurred while the runtime was waiting for
307 // data on the serial port. Once this event is raised, the connection may be 321 // data on the serial port. Once this event is raised, the connection may be
308 // set to <code>paused</code>. A <code>"timeout"</code> error does not pause 322 // set to <code>paused</code>. A <code>"timeout"</code> error does not pause
309 // the connection. 323 // the connection.
310 static void onReceiveError(ReceiveErrorInfo info); 324 static void onReceiveError(ReceiveErrorInfo info);
311 }; 325 };
312 }; 326 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698