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

Side by Side Diff: third_party/WebKit/Source/modules/bluetooth/BluetoothUUIDTraits.h

Issue 2565913002: [Onion Soup] Move WebBluetoothImpl from //content/renderer/bluetooth to Blink's bluetooth module (Closed)
Patch Set: added typemap for Bluetooth uuid on blink side 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef BluetoothUUIDTraits_h
6 #define BluetoothUUIDTraits_h
7
8 #include "device/bluetooth/public/interfaces/uuid.mojom-blink.h"
9 #include "wtf/text/WTFString.h"
10
11 namespace mojo {
12
13 template <>
14 struct StructTraits<bluetooth::mojom::blink::UUID::DataView, WTF::String> {
15 static const WTF::String& uuid(const WTF::String& input) { return input; }
16
17 static bool Read(bluetooth::mojom::blink::UUID::DataView data,
18 WTF::String* output) {
19 StringDataView view;
20 data.GetUuidDataView(&view);
21 *output = WTF::String(reinterpret_cast<const UChar*>(view.storage()),
dcheng 2016/12/29 08:58:06 Can this just be: return data.ReadUuid(output);
juncai 2016/12/29 22:22:59 Done.
22 view.size());
23 return true;
24 }
25 };
26
27 } // namespace mojo
28
29 #endif // BluetoothUUIDTraits_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698