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

Side by Side Diff: chrome/browser/extensions/api/hid/hid_connection_resource.cc

Issue 395333003: Extensions: Move cast_channel and hid APIs to extensions/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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.
4
5 #include "chrome/browser/extensions/api/hid/hid_connection_resource.h"
6
7 #include <string>
8
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"
14
15 namespace extensions {
16
17 static base::LazyInstance<
18 BrowserContextKeyedAPIFactory<ApiResourceManager<HidConnectionResource> > >
19 g_factory = LAZY_INSTANCE_INITIALIZER;
20
21 // static
22 template <>
23 BrowserContextKeyedAPIFactory<ApiResourceManager<HidConnectionResource> >*
24 ApiResourceManager<HidConnectionResource>::GetFactoryInstance() {
25 return &g_factory.Get();
26 }
27
28 HidConnectionResource::HidConnectionResource(
29 const std::string& owner_extension_id,
30 scoped_refptr<device::HidConnection> connection)
31 : ApiResource(owner_extension_id), connection_(connection) {}
32
33 HidConnectionResource::~HidConnectionResource() {}
34
35 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/hid/hid_connection_resource.h ('k') | chrome/browser/extensions/api/hid/hid_device_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698