OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 15 matching lines...) Expand all Loading... |
26 #ifndef MediaDeviceInfo_h | 26 #ifndef MediaDeviceInfo_h |
27 #define MediaDeviceInfo_h | 27 #define MediaDeviceInfo_h |
28 | 28 |
29 #include "bindings/core/v8/ScriptWrappable.h" | 29 #include "bindings/core/v8/ScriptWrappable.h" |
30 #include "modules/ModulesExport.h" | 30 #include "modules/ModulesExport.h" |
31 #include "platform/heap/Handle.h" | 31 #include "platform/heap/Handle.h" |
32 #include "public/platform/WebMediaDeviceInfo.h" | 32 #include "public/platform/WebMediaDeviceInfo.h" |
33 | 33 |
34 namespace blink { | 34 namespace blink { |
35 | 35 |
| 36 class ScriptState; |
| 37 class ScriptValue; |
| 38 |
36 class MODULES_EXPORT MediaDeviceInfo final : public GarbageCollectedFinalized<Me
diaDeviceInfo>, public ScriptWrappable { | 39 class MODULES_EXPORT MediaDeviceInfo final : public GarbageCollectedFinalized<Me
diaDeviceInfo>, public ScriptWrappable { |
37 DEFINE_WRAPPERTYPEINFO(); | 40 DEFINE_WRAPPERTYPEINFO(); |
38 public: | 41 public: |
39 static MediaDeviceInfo* create(const WebMediaDeviceInfo&); | 42 static MediaDeviceInfo* create(const WebMediaDeviceInfo&); |
40 | 43 |
41 String deviceId() const; | 44 String deviceId() const; |
42 String kind() const; | 45 String kind() const; |
43 String label() const; | 46 String label() const; |
44 String groupId() const; | 47 String groupId() const; |
45 | 48 |
| 49 ScriptValue toJSONForBinding(ScriptState*); |
| 50 |
46 DEFINE_INLINE_TRACE() { } | 51 DEFINE_INLINE_TRACE() { } |
47 | 52 |
48 private: | 53 private: |
49 explicit MediaDeviceInfo(const WebMediaDeviceInfo&); | 54 explicit MediaDeviceInfo(const WebMediaDeviceInfo&); |
50 | 55 |
51 WebMediaDeviceInfo m_webMediaDeviceInfo; | 56 WebMediaDeviceInfo m_webMediaDeviceInfo; |
52 }; | 57 }; |
53 | 58 |
54 typedef HeapVector<Member<MediaDeviceInfo>> MediaDeviceInfoVector; | 59 typedef HeapVector<Member<MediaDeviceInfo>> MediaDeviceInfoVector; |
55 | 60 |
56 } // namespace blink | 61 } // namespace blink |
57 | 62 |
58 #endif // MediaDeviceInfo_h | 63 #endif // MediaDeviceInfo_h |
OLD | NEW |