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

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: Include string 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..2b6e5263d4f8ef90cb4f2a5e33d24720532da1fd 100644
--- a/content/renderer/bluetooth/bluetooth_type_converters.h
+++ b/content/renderer/bluetooth/bluetooth_type_converters.h
@@ -5,7 +5,10 @@
#ifndef CONTENT_RENDERER_BLUETOOTH_BLUETOOTH_TYPE_CONVERTERS_H_
#define CONTENT_RENDERER_BLUETOOTH_BLUETOOTH_TYPE_CONVERTERS_H_
+#include "base/optional.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 +32,12 @@ struct TypeConverter<blink::mojom::WebBluetoothRequestDeviceOptionsPtr,
const blink::WebRequestDeviceOptions& web_options);
};
+template <>
jbroman 2016/06/08 21:08:07 Is this type converter used? It looks like web_blu
ortuno 2016/06/09 16:15:59 Yup, it's used in the previous type converter.
+struct TypeConverter<base::Optional<device::BluetoothUUID>, blink::WebString> {
+ static base::Optional<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