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

Unified Diff: content/renderer/bluetooth/bluetooth_type_converters.h

Issue 2015463004: bluetooth: Use BluetoothUUID instead of string when sending uuids (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-mojo-request-device
Patch Set: Add header Created 4 years, 7 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
Index: content/renderer/bluetooth/bluetooth_type_converters.h
diff --git a/content/renderer/bluetooth/bluetooth_type_converters.h b/content/renderer/bluetooth/bluetooth_type_converters.h
index 960c1f5cd7d5d960d6988f11a982b4f58c183656..194798082892ff1251825cdea419785007f45564 100644
--- a/content/renderer/bluetooth/bluetooth_type_converters.h
+++ b/content/renderer/bluetooth/bluetooth_type_converters.h
@@ -5,7 +5,9 @@
#ifndef CONTENT_RENDERER_BLUETOOTH_BLUETOOTH_TYPE_CONVERTERS_H_
#define CONTENT_RENDERER_BLUETOOTH_BLUETOOTH_TYPE_CONVERTERS_H_
+#include "device/bluetooth/bluetooth_uuid.h"
#include "mojo/public/cpp/bindings/type_converter.h"
+#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom.h"
namespace blink {
@@ -29,6 +31,12 @@ struct TypeConverter<blink::mojom::WebBluetoothRequestDeviceOptionsPtr,
const blink::WebRequestDeviceOptions& web_options);
};
+template <>
+struct TypeConverter<std::unique_ptr<device::BluetoothUUID>, blink::WebString> {
+ static std::unique_ptr<device::BluetoothUUID> Convert(
+ const blink::WebString& web_string);
+};
+
} // namespace mojo
#endif // CONTENT_RENDERER_BLUETOOTH_BLUETOOTH_TYPE_CONVERTERS_H_

Powered by Google App Engine
This is Rietveld 408576698