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

Unified Diff: content/common/bluetooth/bluetooth_device.h

Issue 885723002: bluetooth: Provide more device attributes in requestDevice reply. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bt-0
Patch Set: fixes from mek comments Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/bluetooth/DEPS ('k') | content/common/bluetooth/bluetooth_device.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/bluetooth/bluetooth_device.h
diff --git a/content/common/bluetooth/bluetooth_device.h b/content/common/bluetooth/bluetooth_device.h
new file mode 100644
index 0000000000000000000000000000000000000000..a9cf5bcce2337375663d7ef43207c5d6ba56afd8
--- /dev/null
+++ b/content/common/bluetooth/bluetooth_device.h
@@ -0,0 +1,50 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
armansito 2015/01/29 04:27:33 nit: s/2014/2015/
scheib 2015/01/29 16:23:04 Done.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_COMMON_BLUETOOTH_BLUETOOTH_DEVICE_H_
+#define CONTENT_COMMON_BLUETOOTH_BLUETOOTH_DEVICE_H_
+
+#include <string>
+
+#include "base/basictypes.h"
+#include "base/strings/string16.h"
+#include "content/common/content_export.h"
+#include "device/bluetooth/bluetooth_device.h"
+
+namespace content {
+
+// Data sent over IPC representing a Bluetooth device, corresponding to
+// blink::WebBluetoothDevice.
+struct CONTENT_EXPORT BluetoothDevice {
+ BluetoothDevice();
+ BluetoothDevice(const std::string& instance_id,
+ const base::string16& name,
+ uint32 device_class,
+ device::BluetoothDevice::VendorIDSource vendor_id_source,
+ uint16 vendor_id,
+ uint16 product_id,
+ uint16 product_version,
+ bool paired,
+ bool connected,
+ const std::vector<std::string>& uuids);
+ ~BluetoothDevice();
+
+ static std::vector<std::string> UUIDsFromBluetoothUUIDs(
+ const device::BluetoothDevice::UUIDList& uuid_list);
+
+ std::string instance_id;
+ base::string16 name;
+ uint32 device_class;
+ device::BluetoothDevice::VendorIDSource vendor_id_source;
+ uint16 vendor_id;
+ uint16 product_id;
+ uint16 product_version;
+ bool paired;
+ bool connected;
+ std::vector<std::string> uuids; // 128bit UUIDs with dashes. 36 chars.
armansito 2015/01/29 04:27:33 You could just store these as device::BluetoothUUI
scheib 2015/01/29 16:23:04 I can't send device::BluetoothUUID all the way to
+};
+
+} // namespace content
+
+#endif // CONTENT_COMMON_BLUETOOTH_BLUETOOTH_DEVICE_H_
« no previous file with comments | « content/common/bluetooth/DEPS ('k') | content/common/bluetooth/bluetooth_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698