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

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

Issue 514923002: Add more generic filters to the chrome.hid.getDevices API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clean up the chrome.hid documentation even more. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/browser/api/hid/hid_api.cc ('k') | extensions/browser/api/hid/hid_device_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/hid/hid_device_manager.h
diff --git a/extensions/browser/api/hid/hid_device_manager.h b/extensions/browser/api/hid/hid_device_manager.h
index de949609aafd2af799ac916d8a286bafeb50b3cb..a258be49e5a066f4c082d30584b188f01e60115d 100644
--- a/extensions/browser/api/hid/hid_device_manager.h
+++ b/extensions/browser/api/hid/hid_device_manager.h
@@ -16,8 +16,14 @@
#include "extensions/browser/browser_context_keyed_api_factory.h"
#include "extensions/common/api/hid.h"
+namespace device {
+class HidDeviceFilter;
+}
+
namespace extensions {
+class Extension;
+
class HidDeviceManager : public BrowserContextKeyedAPI {
public:
explicit HidDeviceManager(content::BrowserContext* context);
@@ -31,11 +37,15 @@ class HidDeviceManager : public BrowserContextKeyedAPI {
return BrowserContextKeyedAPIFactory<HidDeviceManager>::Get(context);
}
- scoped_ptr<base::ListValue> GetApiDevices(uint16_t vendor_id,
- uint16_t product_id);
+ scoped_ptr<base::ListValue> GetApiDevices(
+ const Extension* extension,
+ const std::vector<device::HidDeviceFilter>& filters);
bool GetDeviceInfo(int resource_id, device::HidDeviceInfo* device_info);
+ bool HasPermission(const Extension* extension,
+ const device::HidDeviceInfo& device_info);
+
private:
friend class BrowserContextKeyedAPIFactory<HidDeviceManager>;
« no previous file with comments | « extensions/browser/api/hid/hid_api.cc ('k') | extensions/browser/api/hid/hid_device_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698