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

Unified Diff: device/hid/hid_utils_mac.cc

Issue 317783010: chrome.hid: enrich model with report IDs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix hid.idl comment 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/hid/hid_utils_mac.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/hid/hid_utils_mac.cc
diff --git a/device/hid/hid_utils_mac.cc b/device/hid/hid_utils_mac.cc
deleted file mode 100644
index 46605d87bdb2a12fa165e54901b822a6a5433f68..0000000000000000000000000000000000000000
--- a/device/hid/hid_utils_mac.cc
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "device/hid/hid_utils_mac.h"
-
-#include "base/mac/foundation_util.h"
-#include "base/strings/sys_string_conversions.h"
-
-namespace device {
-
-int32_t GetHidIntProperty(IOHIDDeviceRef device, CFStringRef key) {
- int32_t value;
- if (TryGetHidIntProperty(device, key, &value))
- return value;
- return 0;
-}
-
-std::string GetHidStringProperty(IOHIDDeviceRef device, CFStringRef key) {
- std::string value;
- TryGetHidStringProperty(device, key, &value);
- return value;
-}
-
-bool TryGetHidIntProperty(IOHIDDeviceRef device,
- CFStringRef key,
- int32_t* result) {
- CFNumberRef ref = base::mac::CFCast<CFNumberRef>(
- IOHIDDeviceGetProperty(device, key));
- return ref && CFNumberGetValue(ref, kCFNumberSInt32Type, result);
-}
-
-bool TryGetHidStringProperty(IOHIDDeviceRef device,
- CFStringRef key,
- std::string* result) {
- CFStringRef ref = base::mac::CFCast<CFStringRef>(
- IOHIDDeviceGetProperty(device, key));
- if (!ref) {
- return false;
- }
- *result = base::SysCFStringRefToUTF8(ref);
- return true;
-}
-
-} // namespace device
« no previous file with comments | « device/hid/hid_utils_mac.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698