Chromium Code Reviews| Index: extensions/browser/api/bluetooth_low_energy/bluetooth_api_advertisement.cc |
| diff --git a/extensions/browser/api/bluetooth_low_energy/bluetooth_api_advertisement.cc b/extensions/browser/api/bluetooth_low_energy/bluetooth_api_advertisement.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..d6b0aa801e5ff6bbbe5fdbfb2e9de17b99007dcf |
| --- /dev/null |
| +++ b/extensions/browser/api/bluetooth_low_energy/bluetooth_api_advertisement.cc |
| @@ -0,0 +1,35 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
|
armansito
2015/05/08 22:46:13
s/2014/2015/
rkc
2015/05/11 21:59:34
Done.
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "extensions/browser/api/bluetooth_low_energy/bluetooth_api_advertisement.h" |
| + |
| +#include "base/lazy_instance.h" |
| +#include "device/bluetooth/bluetooth_advertisement.h" |
| +#include "net/base/io_buffer.h" |
| + |
| +namespace extensions { |
| + |
| +// static |
| +static base::LazyInstance<BrowserContextKeyedAPIFactory< |
| + ApiResourceManager<BluetoothApiAdvertisement>>> g_server_factory = |
| + LAZY_INSTANCE_INITIALIZER; |
| + |
| +// static |
| +template <> |
| +BrowserContextKeyedAPIFactory<ApiResourceManager<BluetoothApiAdvertisement>>* |
| +ApiResourceManager<BluetoothApiAdvertisement>::GetFactoryInstance() { |
| + return g_server_factory.Pointer(); |
| +} |
| + |
| +BluetoothApiAdvertisement::BluetoothApiAdvertisement( |
| + const std::string& owner_extension_id, |
| + scoped_refptr<device::BluetoothAdvertisement> advertisement) |
| + : ApiResource(owner_extension_id), advertisement_(advertisement) { |
| + DCHECK(content::BrowserThread::CurrentlyOn(kThreadId)); |
| +} |
| + |
| +BluetoothApiAdvertisement::~BluetoothApiAdvertisement() { |
| +} |
| + |
| +} // namespace extensions |