OLD | NEW |
---|---|
(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> > > | |
11 g_factory = 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 const std::string& owner_extension_id, | |
22 scoped_ptr<device::BluetoothGattConnection> connection) | |
23 : ApiResource(owner_extension_id), | |
24 connection_(connection.release()) { | |
25 } | |
26 | |
27 BluetoothLowEnergyConnection::~BluetoothLowEnergyConnection() {} | |
28 | |
29 device::BluetoothGattConnection* | |
30 BluetoothLowEnergyConnection::GetConnection() const { | |
31 return connection_.get(); | |
32 } | |
33 | |
34 bool BluetoothLowEnergyConnection::IsPersistent() const { | |
35 return true; | |
36 } | |
keybuk
2014/06/19 17:23:49
I leave it up to kalman to decide whether having a
not at google - send to devlin
2014/06/19 17:27:09
I'm quite sure we do want this, it's important for
rpaquay
2014/06/19 19:07:26
Hmm... I don't quite know the use cases for this A
armansito
2014/06/19 21:58:34
After offline discussion with rpaquay@, I added an
| |
37 | |
38 } // namespace extensions | |
OLD | NEW |