Index: third_party/WebKit/Source/platform/mojo/BluetoothUUIDTraits.h |
diff --git a/third_party/WebKit/Source/platform/mojo/BluetoothUUIDTraits.h b/third_party/WebKit/Source/platform/mojo/BluetoothUUIDTraits.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..170f7f3f6a5459d8b51525907aefc094c4ba770c |
--- /dev/null |
+++ b/third_party/WebKit/Source/platform/mojo/BluetoothUUIDTraits.h |
@@ -0,0 +1,22 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
dcheng
2016/12/30 09:19:06
Name this file with StructTraits.h suffix instead
juncai
2017/01/03 19:57:42
Done.
|
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef BluetoothUUIDTraits_h |
+#define BluetoothUUIDTraits_h |
+ |
+#include "device/bluetooth/public/interfaces/uuid.mojom-blink.h" |
+#include "wtf/text/WTFString.h" |
+ |
+namespace mojo { |
+ |
+template <> |
+struct StructTraits<bluetooth::mojom::UUIDDataView, WTF::String> { |
+ static const WTF::String& uuid(const WTF::String& input) { return input; } |
+ |
+ static bool Read(bluetooth::mojom::UUIDDataView, WTF::String* output); |
+}; |
+ |
+} // namespace mojo |
+ |
+#endif // BluetoothUUIDTraits_h |