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"
9 #include "base/lazy_instance.h"
10 #include "base/memory/ref_counted.h"
11 #include "device/hid/hid_connection.h"
12 #include "extensions/browser/api/api_resource_manager.h"
14 namespace extensions
{
16 static base::LazyInstance
<
17 BrowserContextKeyedAPIFactory
<ApiResourceManager
<HidConnectionResource
> > >
18 g_factory
= LAZY_INSTANCE_INITIALIZER
;
22 BrowserContextKeyedAPIFactory
<ApiResourceManager
<HidConnectionResource
> >*
23 ApiResourceManager
<HidConnectionResource
>::GetFactoryInstance() {
24 return &g_factory
.Get();
27 HidConnectionResource::HidConnectionResource(
28 const std::string
& owner_extension_id
,
29 scoped_refptr
<device::HidConnection
> connection
)
30 : ApiResource(owner_extension_id
), connection_(connection
) {}
32 HidConnectionResource::~HidConnectionResource() {
36 bool HidConnectionResource::IsPersistent() const {
40 } // namespace extensions