| Index: extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_event_router.h
|
| diff --git a/chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_event_router.h b/extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_event_router.h
|
| similarity index 94%
|
| rename from chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_event_router.h
|
| rename to extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_event_router.h
|
| index 8445ad3cb0afcfa32af968d85d6928b532b122ea..0cfab188b5c39bc1dfef9166a75cee3a62b79fcd 100644
|
| --- a/chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_event_router.h
|
| +++ b/extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_event_router.h
|
| @@ -2,8 +2,8 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENERGY_EVENT_ROUTER_H_
|
| -#define CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENERGY_EVENT_ROUTER_H_
|
| +#ifndef EXTENSIONS_BROWSER_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENERGY_EVENT_ROUTER_H_
|
| +#define EXTENSIONS_BROWSER_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENERGY_EVENT_ROUTER_H_
|
|
|
| #include <map>
|
| #include <set>
|
| @@ -13,11 +13,11 @@
|
| #include "base/callback.h"
|
| #include "base/memory/linked_ptr.h"
|
| #include "base/memory/weak_ptr.h"
|
| -#include "chrome/common/extensions/api/bluetooth_low_energy.h"
|
| #include "content/public/browser/notification_observer.h"
|
| #include "device/bluetooth/bluetooth_adapter.h"
|
| #include "device/bluetooth/bluetooth_device.h"
|
| #include "device/bluetooth/bluetooth_gatt_service.h"
|
| +#include "extensions/common/api/bluetooth_low_energy.h"
|
|
|
| namespace base {
|
|
|
| @@ -103,13 +103,14 @@ class BluetoothLowEnergyEventRouter
|
| const base::Closure& callback,
|
| const ErrorCallback& error_callback);
|
|
|
| - // Returns the list of api::bluetooth_low_energy::Service objects associated
|
| - // with the Bluetooth device with address |device_address| in |out_services|.
|
| + // Returns the list of core_api::bluetooth_low_energy::Service objects
|
| + // associated with the Bluetooth device with address |device_address| in
|
| + // |out_services|.
|
| // Returns false, if no device with the given address is known. If the device
|
| // is found but it has no GATT services, then returns true and leaves
|
| // |out_services| empty. Returns true, on success. |out_services| must not
|
| // be NULL. If it is non-empty, then its contents will be cleared.
|
| - typedef std::vector<linked_ptr<api::bluetooth_low_energy::Service> >
|
| + typedef std::vector<linked_ptr<core_api::bluetooth_low_energy::Service> >
|
| ServiceList;
|
| bool GetServices(const std::string& device_address,
|
| ServiceList* out_services) const;
|
| @@ -117,7 +118,7 @@ class BluetoothLowEnergyEventRouter
|
| // Populates |out_service| based on GATT service with instance ID
|
| // |instance_id|. |out_service| must not be NULL.
|
| Status GetService(const std::string& instance_id,
|
| - api::bluetooth_low_energy::Service* out_service) const;
|
| + core_api::bluetooth_low_energy::Service* out_service) const;
|
|
|
| // Populates |out_services| with the list of GATT services that are included
|
| // by the GATT service with instance ID |instance_id|. Returns false, if not
|
| @@ -127,7 +128,7 @@ class BluetoothLowEnergyEventRouter
|
| Status GetIncludedServices(const std::string& instance_id,
|
| ServiceList* out_services) const;
|
|
|
| - // Returns the list of api::bluetooth_low_energy::Characteristic objects
|
| + // Returns the list of core_api::bluetooth_low_energy::Characteristic objects
|
| // associated with the GATT service with instance ID |instance_id| in
|
| // |out_characteristics|. Returns false, if no service with the given instance
|
| // ID is known. If the service is found but it has no characteristics, then
|
| @@ -135,7 +136,8 @@ class BluetoothLowEnergyEventRouter
|
| // |out_characteristics| must not be NULL and if it is non-empty,
|
| // then its contents will be cleared. |extension| is the extension that made
|
| // the call.
|
| - typedef std::vector<linked_ptr<api::bluetooth_low_energy::Characteristic> >
|
| + typedef std::vector<
|
| + linked_ptr<core_api::bluetooth_low_energy::Characteristic> >
|
| CharacteristicList;
|
| Status GetCharacteristics(const Extension* extension,
|
| const std::string& instance_id,
|
| @@ -147,16 +149,16 @@ class BluetoothLowEnergyEventRouter
|
| Status GetCharacteristic(
|
| const Extension* extension,
|
| const std::string& instance_id,
|
| - api::bluetooth_low_energy::Characteristic* out_characteristic) const;
|
| + core_api::bluetooth_low_energy::Characteristic* out_characteristic) const;
|
|
|
| - // Returns the list of api::bluetooth_low_energy::Descriptor objects
|
| + // Returns the list of core_api::bluetooth_low_energy::Descriptor objects
|
| // associated with the GATT characteristic with instance ID |instance_id| in
|
| // |out_descriptors|. If the characteristic is found but it has no
|
| // descriptors, then returns true and leaves |out_descriptors| empty.
|
| // |out_descriptors| must not be NULL and if it is non-empty,
|
| // then its contents will be cleared. |extension| is the extension that made
|
| // the call.
|
| - typedef std::vector<linked_ptr<api::bluetooth_low_energy::Descriptor> >
|
| + typedef std::vector<linked_ptr<core_api::bluetooth_low_energy::Descriptor> >
|
| DescriptorList;
|
| Status GetDescriptors(const Extension* extension,
|
| const std::string& instance_id,
|
| @@ -168,7 +170,7 @@ class BluetoothLowEnergyEventRouter
|
| Status GetDescriptor(
|
| const Extension* extension,
|
| const std::string& instance_id,
|
| - api::bluetooth_low_energy::Descriptor* out_descriptor) const;
|
| + core_api::bluetooth_low_energy::Descriptor* out_descriptor) const;
|
|
|
| // Sends a request to read the value of the characteristic with intance ID
|
| // |instance_id|. Invokes |callback| on success and |error_callback| on
|
| @@ -413,4 +415,4 @@ class BluetoothLowEnergyEventRouter
|
|
|
| } // namespace extensions
|
|
|
| -#endif // CHROME_BROWSER_EXTENSIONS_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENERGY_EVENT_ROUTER_H_
|
| +#endif // EXTENSIONS_BROWSER_API_BLUETOOTH_LOW_ENERGY_BLUETOOTH_LOW_ENERGY_EVENT_ROUTER_H_
|
|
|