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

Side by Side Diff: third_party/WebKit/Source/modules/mediastream/MediaDeviceInfo.h

Issue 1571303003: Add JSON serializer to MediaDeviceInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2564
Patch Set: Created 4 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/mediastream/MediaDeviceInfo.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/mediastream/MediaDeviceInfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698