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

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

Issue 419713002: Support permission_broker for chrome.hid devices. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add NOTIMPLEMENTED to default GetHidService implementation. Created 6 years, 5 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 | « chrome/browser/extensions/api/hid/hid_api.cc ('k') | device/hid/hid_connection_linux.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.cc
diff --git a/chrome/browser/extensions/api/hid/hid_device_manager.cc b/chrome/browser/extensions/api/hid/hid_device_manager.cc
index 90fb6ce85123b1421726b8da1b2f8bab75cb62d4..f7e996647675759bbf75ba2b7754a5e8b570b652 100644
--- a/chrome/browser/extensions/api/hid/hid_device_manager.cc
+++ b/chrome/browser/extensions/api/hid/hid_device_manager.cc
@@ -3,12 +3,12 @@
// found in the LICENSE file.
#include "chrome/browser/extensions/api/hid/hid_device_manager.h"
-
Reilly Grant (use Gerrit) 2014/07/25 19:57:09 Leave this whitespace.
#include <limits>
#include <vector>
#include "base/lazy_instance.h"
#include "device/hid/hid_service.h"
+#include "extensions/browser/api/extensions_api_client.h"
using device::HidService;
using device::HidUsageAndPage;
@@ -33,7 +33,7 @@ scoped_ptr<base::ListValue> HidDeviceManager::GetApiDevices(
uint16_t product_id) {
UpdateDevices();
- HidService* hid_service = HidService::GetInstance();
+ HidService* hid_service = ExtensionsAPIClient::Get()->GetHidService();
DCHECK(hid_service);
base::ListValue* api_devices = new base::ListValue();
for (ResourceIdToDeviceIdMap::const_iterator device_iter =
@@ -96,7 +96,7 @@ scoped_ptr<base::ListValue> HidDeviceManager::GetApiDevices(
bool HidDeviceManager::GetDeviceInfo(int resource_id,
device::HidDeviceInfo* device_info) {
UpdateDevices();
- HidService* hid_service = HidService::GetInstance();
+ HidService* hid_service = ExtensionsAPIClient::Get()->GetHidService();
DCHECK(hid_service);
ResourceIdToDeviceIdMap::const_iterator device_iter =
@@ -109,7 +109,7 @@ bool HidDeviceManager::GetDeviceInfo(int resource_id,
void HidDeviceManager::UpdateDevices() {
thread_checker_.CalledOnValidThread();
- HidService* hid_service = HidService::GetInstance();
+ HidService* hid_service = ExtensionsAPIClient::Get()->GetHidService();
DCHECK(hid_service);
std::vector<device::HidDeviceInfo> devices;
« no previous file with comments | « chrome/browser/extensions/api/hid/hid_api.cc ('k') | device/hid/hid_connection_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698