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

Side by Side Diff: device/hid/hid_utils_mac.h

Issue 161823002: Clean up HID backend and API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 9 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_win.cc ('k') | device/hid/hid_utils_mac.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 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 #ifndef DEVICE_HID_HID_UTILS_MAC_H_ 5 #ifndef DEVICE_HID_HID_UTILS_MAC_H_
6 #define DEVICE_HID_HID_UTILS_MAC_H_ 6 #define DEVICE_HID_HID_UTILS_MAC_H_
7 7
8 #include "base/callback.h" 8 #include <CoreFoundation/CoreFoundation.h>
9 #include "base/memory/ref_counted.h" 9 #include <IOKit/hid/IOHIDManager.h>
10 #include <stdint.h>
10 11
11 #include <IOKit/hid/IOHIDManager.h> 12 #include <string>
12 13
13 namespace device { 14 namespace device {
14 15
15 bool GetHidIntProperty(IOHIDDeviceRef device, CFStringRef key, int32_t* result); 16 int32_t GetHidIntProperty(IOHIDDeviceRef device, CFStringRef key);
16 17
17 bool GetHidStringProperty(IOHIDDeviceRef device, 18 std::string GetHidStringProperty(IOHIDDeviceRef device, CFStringRef key);
18 CFStringRef key, 19
19 std::string* result); 20 bool TryGetHidIntProperty(IOHIDDeviceRef device,
21 CFStringRef key,
22 int32_t* result);
23
24 bool TryGetHidStringProperty(IOHIDDeviceRef device,
25 CFStringRef key,
26 std::string* result);
20 27
21 } // namespace device 28 } // namespace device
22 29
23 #endif // DEVICE_HID_HID_UTILS_MAC_H_ 30 #endif // DEVICE_HID_HID_UTILS_MAC_H_
OLDNEW
« no previous file with comments | « device/hid/hid_service_win.cc ('k') | device/hid/hid_utils_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698