Add chrome.usb.getConfiguration and expose extra descriptors.
[chromium-blink-merge.git] / extensions / browser / api / hid / hid_connection_resource.cc
blob94883d8c6f1317e9ec2fdbea87ce3b39b7eb870a
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
3 // found in the LICENSE file.
5 #include "extensions/browser/api/hid/hid_connection_resource.h"
7 #include <string>
9 #include "base/bind.h"
10 #include "base/bind_helpers.h"
11 #include "base/lazy_instance.h"
12 #include "base/memory/ref_counted.h"
13 #include "device/hid/hid_connection.h"
15 namespace extensions {
17 static base::LazyInstance<
18 BrowserContextKeyedAPIFactory<ApiResourceManager<HidConnectionResource> > >
19 g_factory = LAZY_INSTANCE_INITIALIZER;
21 // static
22 template <>
23 BrowserContextKeyedAPIFactory<ApiResourceManager<HidConnectionResource> >*
24 ApiResourceManager<HidConnectionResource>::GetFactoryInstance() {
25 return &g_factory.Get();
28 HidConnectionResource::HidConnectionResource(
29 const std::string& owner_extension_id,
30 scoped_refptr<device::HidConnection> connection)
31 : ApiResource(owner_extension_id), connection_(connection) {}
33 HidConnectionResource::~HidConnectionResource() {}
35 bool HidConnectionResource::IsPersistent() const {
36 return false;
39 } // namespace extensions