[Android] Implement 3-way sensor fallback for Device Orientation.
[chromium-blink-merge.git] / content / common / bluetooth / bluetooth_device.cc
blobee9a087291d40719a362a47001c1b6c837eb6b7e
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.
5 #include "content/common/bluetooth/bluetooth_device.h"
7 #include "base/strings/string_util.h"
9 namespace content {
11 BluetoothDevice::BluetoothDevice()
12 : instance_id(""),
13 name(base::string16()),
14 device_class(0),
15 vendor_id_source(
16 device::BluetoothDevice::VendorIDSource::VENDOR_ID_UNKNOWN),
17 vendor_id(0),
18 product_id(0),
19 product_version(0),
20 paired(false),
21 uuids() {
24 BluetoothDevice::BluetoothDevice(
25 const std::string& instance_id,
26 const base::string16& name,
27 uint32 device_class,
28 device::BluetoothDevice::VendorIDSource vendor_id_source,
29 uint16 vendor_id,
30 uint16 product_id,
31 uint16 product_version,
32 bool paired,
33 const std::vector<std::string>& uuids)
34 : instance_id(instance_id),
35 name(name),
36 device_class(device_class),
37 vendor_id_source(vendor_id_source),
38 vendor_id(vendor_id),
39 product_id(product_id),
40 product_version(product_version),
41 paired(paired),
42 uuids(uuids) {
45 BluetoothDevice::~BluetoothDevice() {
48 // static
49 std::vector<std::string> BluetoothDevice::UUIDsFromBluetoothUUIDs(
50 const device::BluetoothDevice::UUIDList& uuid_list) {
51 std::vector<std::string> uuids;
52 uuids.reserve(uuid_list.size());
53 for (const auto& it : uuid_list)
54 uuids.push_back(it.canonical_value());
55 return uuids;
58 } // namespace content