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

Side by Side Diff: chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_connection.cc

Issue 420663003: Extensions: Move bluetooth APIs to extensions/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix android, gn Created 6 years, 3 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/bluetooth_low_energy/bluetooth_low_energ y_connection.h"
6
7 namespace extensions {
8
9 static base::LazyInstance<BrowserContextKeyedAPIFactory<
10 ApiResourceManager<BluetoothLowEnergyConnection> > > g_factory =
11 LAZY_INSTANCE_INITIALIZER;
12
13 template <>
14 BrowserContextKeyedAPIFactory<
15 ApiResourceManager<BluetoothLowEnergyConnection> >*
16 ApiResourceManager<BluetoothLowEnergyConnection>::GetFactoryInstance() {
17 return g_factory.Pointer();
18 }
19
20 BluetoothLowEnergyConnection::BluetoothLowEnergyConnection(
21 bool persistent,
22 const std::string& owner_extension_id,
23 scoped_ptr<device::BluetoothGattConnection> connection)
24 : ApiResource(owner_extension_id),
25 persistent_(persistent),
26 connection_(connection.release()) {
27 }
28
29 BluetoothLowEnergyConnection::~BluetoothLowEnergyConnection() {
30 }
31
32 device::BluetoothGattConnection*
33 BluetoothLowEnergyConnection::GetConnection() const {
34 return connection_.get();
35 }
36
37 bool BluetoothLowEnergyConnection::IsPersistent() const {
38 return persistent_;
39 }
40
41 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698