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

Side by Side Diff: device/hid/hid_service_mac.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/hid_service_linux.cc ('k') | device/hid/hid_service_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 2014 The Chromium Authors. All rights reserved. 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 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_service_mac.h" 5 #include "device/hid/hid_service_mac.h"
6 6
7 #include <CoreFoundation/CoreFoundation.h> 7 #include <CoreFoundation/CoreFoundation.h>
8 #include <IOKit/hid/IOHIDManager.h> 8 #include <IOKit/hid/IOHIDManager.h>
9 9
10 #include <set> 10 #include <set>
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/bind.h" 14 #include "base/bind.h"
15 #include "base/logging.h" 15 #include "base/logging.h"
16 #include "base/mac/foundation_util.h" 16 #include "base/mac/foundation_util.h"
17 #include "base/message_loop/message_loop.h"
17 #include "base/message_loop/message_loop_proxy.h" 18 #include "base/message_loop/message_loop_proxy.h"
18 #include "base/stl_util.h" 19 #include "base/stl_util.h"
19 #include "base/strings/string_number_conversions.h" 20 #include "base/strings/string_number_conversions.h"
20 #include "base/strings/sys_string_conversions.h" 21 #include "base/strings/sys_string_conversions.h"
21 #include "base/threading/thread_restrictions.h" 22 #include "base/threading/thread_restrictions.h"
22 #include "device/hid/hid_connection_mac.h" 23 #include "device/hid/hid_connection_mac.h"
23 24
24 namespace device { 25 namespace device {
25 26
26 class HidServiceMac; 27 class HidServiceMac;
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 scoped_refptr<HidConnection> HidServiceMac::Connect( 251 scoped_refptr<HidConnection> HidServiceMac::Connect(
251 const HidDeviceId& device_id) { 252 const HidDeviceId& device_id) {
252 DCHECK(thread_checker_.CalledOnValidThread()); 253 DCHECK(thread_checker_.CalledOnValidThread());
253 HidDeviceInfo device_info; 254 HidDeviceInfo device_info;
254 if (!GetDeviceInfo(device_id, &device_info)) 255 if (!GetDeviceInfo(device_id, &device_info))
255 return NULL; 256 return NULL;
256 return scoped_refptr<HidConnection>(new HidConnectionMac(device_info)); 257 return scoped_refptr<HidConnection>(new HidConnectionMac(device_info));
257 } 258 }
258 259
259 } // namespace device 260 } // namespace device
OLDNEW
« no previous file with comments | « device/hid/hid_service_linux.cc ('k') | device/hid/hid_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698