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

Side by Side Diff: device/hid/hid_connection_linux.cc

Issue 419713002: Support permission_broker for chrome.hid devices. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix hid in app_shell after its move to //extensions Created 6 years, 4 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
« no previous file with comments | « device/hid/DEPS ('k') | device/hid/hid_connection_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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 #include "device/hid/hid_connection_linux.h" 5 #include "device/hid/hid_connection_linux.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <libudev.h> 9 #include <libudev.h>
10 #include <linux/hidraw.h> 10 #include <linux/hidraw.h>
11 #include <sys/ioctl.h> 11 #include <sys/ioctl.h>
12 12
13 #include <string> 13 #include <string>
14 14
15 #include "base/files/file_path.h" 15 #include "base/files/file_path.h"
16 #include "base/message_loop/message_loop.h"
16 #include "base/posix/eintr_wrapper.h" 17 #include "base/posix/eintr_wrapper.h"
17 #include "base/threading/thread_restrictions.h" 18 #include "base/threading/thread_restrictions.h"
18 #include "base/tuple.h" 19 #include "base/tuple.h"
19 #include "device/hid/hid_service.h" 20 #include "device/hid/hid_service.h"
20 21
21 // These are already defined in newer versions of linux/hidraw.h. 22 // These are already defined in newer versions of linux/hidraw.h.
22 #ifndef HIDIOCSFEATURE 23 #ifndef HIDIOCSFEATURE
23 #define HIDIOCSFEATURE(len) _IOC(_IOC_WRITE | _IOC_READ, 'H', 0x06, len) 24 #define HIDIOCSFEATURE(len) _IOC(_IOC_WRITE | _IOC_READ, 'H', 0x06, len)
24 #endif 25 #endif
25 #ifndef HIDIOCGFEATURE 26 #ifndef HIDIOCGFEATURE
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 pending_reports_.pop(); 225 pending_reports_.pop();
225 226
226 if (CompleteRead(report.buffer, read.callback)) { 227 if (CompleteRead(report.buffer, read.callback)) {
227 pending_reads_.pop(); 228 pending_reads_.pop();
228 } 229 }
229 } 230 }
230 } 231 }
231 } 232 }
232 233
233 } // namespace device 234 } // namespace device
OLDNEW
« no previous file with comments | « device/hid/DEPS ('k') | device/hid/hid_connection_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698