OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 BluetoothUUID_h | 5 #ifndef BluetoothUUID_h |
6 #define BluetoothUUID_h | 6 #define BluetoothUUID_h |
7 | 7 |
8 #include "bindings/core/v8/ScriptWrappable.h" | 8 #include "bindings/core/v8/ScriptWrappable.h" |
9 #include "bindings/modules/v8/StringOrUnsignedLong.h" | 9 #include "bindings/modules/v8/StringOrUnsignedLong.h" |
10 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
11 | 11 |
12 namespace blink { | 12 namespace blink { |
13 | 13 |
14 class ExceptionState; | 14 class ExceptionState; |
15 | 15 |
16 // This class provides a way for script to look up UUIDs by name so they don't n
eed to be replicated in each application. | 16 // This class provides a way for script to look up UUIDs by name so they don't |
| 17 // need to be replicated in each application. |
17 class BluetoothUUID final : public GarbageCollected<BluetoothUUID>, | 18 class BluetoothUUID final : public GarbageCollected<BluetoothUUID>, |
18 public ScriptWrappable { | 19 public ScriptWrappable { |
19 DEFINE_WRAPPERTYPEINFO(); | 20 DEFINE_WRAPPERTYPEINFO(); |
20 | 21 |
21 public: | 22 public: |
22 // IDL exposed interface: | 23 // IDL exposed interface: |
23 static String getService(StringOrUnsignedLong name, ExceptionState&); | 24 static String getService(StringOrUnsignedLong name, ExceptionState&); |
24 static String getCharacteristic(StringOrUnsignedLong name, ExceptionState&); | 25 static String getCharacteristic(StringOrUnsignedLong name, ExceptionState&); |
25 static String getDescriptor(StringOrUnsignedLong name, ExceptionState&); | 26 static String getDescriptor(StringOrUnsignedLong name, ExceptionState&); |
26 static String canonicalUUID(unsigned alias); | 27 static String canonicalUUID(unsigned alias); |
27 | 28 |
28 // Interface required by garbage collection. | 29 // Interface required by garbage collection. |
29 DEFINE_INLINE_TRACE() {} | 30 DEFINE_INLINE_TRACE() {} |
30 }; | 31 }; |
31 | 32 |
32 } // namespace blink | 33 } // namespace blink |
33 | 34 |
34 #endif // BluetoothUUID_h | 35 #endif // BluetoothUUID_h |
OLD | NEW |