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

Side by Side Diff: third_party/WebKit/Source/platform/mojo/BluetoothStructTraits.h

Issue 2615093002: Typemap WebBluetoothDeviceId to WTF::String (Closed)
Patch Set: merge master Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BluetoothStructTraits_h 5 #ifndef BluetoothStructTraits_h
6 #define BluetoothStructTraits_h 6 #define BluetoothStructTraits_h
7 7
8 #include "device/bluetooth/public/interfaces/uuid.mojom-blink.h" 8 #include "device/bluetooth/public/interfaces/uuid.mojom-blink.h"
9 #include "public/platform/modules/bluetooth/web_bluetooth.mojom-blink.h"
9 #include "wtf/text/WTFString.h" 10 #include "wtf/text/WTFString.h"
10 11
11 namespace mojo { 12 namespace mojo {
12 13
13 template <> 14 template <>
15 struct StructTraits<::blink::mojom::WebBluetoothDeviceIdDataView, WTF::String> {
16 static const WTF::String& device_id(const WTF::String& input) {
17 return input;
18 }
19
20 static bool Read(::blink::mojom::WebBluetoothDeviceIdDataView,
21 WTF::String* output);
22 };
23
24 template <>
14 struct StructTraits<bluetooth::mojom::UUIDDataView, WTF::String> { 25 struct StructTraits<bluetooth::mojom::UUIDDataView, WTF::String> {
15 static const WTF::String& uuid(const WTF::String& input) { return input; } 26 static const WTF::String& uuid(const WTF::String& input) { return input; }
16 27
17 static bool Read(bluetooth::mojom::UUIDDataView, WTF::String* output); 28 static bool Read(bluetooth::mojom::UUIDDataView, WTF::String* output);
18 }; 29 };
19 30
20 } // namespace mojo 31 } // namespace mojo
21 32
22 #endif // BluetoothStructTraits_h 33 #endif // BluetoothStructTraits_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698