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

Unified Diff: chrome/browser/extensions/api/hid/hid_device_manager.h

Issue 258733002: Block some HID devices from chrome.hid. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test TODO Created 6 years, 8 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 | « no previous file | chrome/browser/extensions/api/hid/hid_device_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/hid/hid_device_manager.h
diff --git a/chrome/browser/extensions/api/hid/hid_device_manager.h b/chrome/browser/extensions/api/hid/hid_device_manager.h
index 84a6e3022e5335c59a3d9551473bdb96714fa6fe..c0abedd0ccf694446880e72057260401a4f15efa 100644
--- a/chrome/browser/extensions/api/hid/hid_device_manager.h
+++ b/chrome/browser/extensions/api/hid/hid_device_manager.h
@@ -44,6 +44,15 @@ class HidDeviceManager : public BrowserContextKeyedAPI {
void UpdateDevices();
+ // Determines if a given device interface should be accessible to API
+ // consumers. In order for a device interface to be accessible, ALL of its
+ // specified usages must be accessible.
+ static bool IsDeviceAccessible(const device::HidDeviceInfo& device_info);
+
+ // Determines if a given usage is available to API consumers. This is used to
+ // blacklist usages which could be security or privacy concerns.
+ static bool IsUsageAccessible(const device::HidUsageAndPage& usage_and_page);
+
base::ThreadChecker thread_checker_;
int next_resource_id_;
« no previous file with comments | « no previous file | chrome/browser/extensions/api/hid/hid_device_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698