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

Side by Side Diff: Source/modules/mediastream/RTCStatsReport.h

Issue 173363002: Move mediastream module to oilpan transition types (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 17 matching lines...) Expand all
28 #include "bindings/v8/ScriptWrappable.h" 28 #include "bindings/v8/ScriptWrappable.h"
29 #include "wtf/HashMap.h" 29 #include "wtf/HashMap.h"
30 #include "wtf/PassRefPtr.h" 30 #include "wtf/PassRefPtr.h"
31 #include "wtf/RefCounted.h" 31 #include "wtf/RefCounted.h"
32 #include "wtf/Vector.h" 32 #include "wtf/Vector.h"
33 #include "wtf/text/StringHash.h" 33 #include "wtf/text/StringHash.h"
34 #include "wtf/text/WTFString.h" 34 #include "wtf/text/WTFString.h"
35 35
36 namespace WebCore { 36 namespace WebCore {
37 37
38 class RTCStatsReport : public RefCounted<RTCStatsReport>, public ScriptWrappable { 38 class RTCStatsReport FINAL : public RefCountedWillBeGarbageCollectedFinalized<RT CStatsReport>, public ScriptWrappable {
39 public: 39 public:
40 static PassRefPtr<RTCStatsReport> create(const String& id, const String& typ e, double timestamp); 40 static PassRefPtrWillBeRawPtr<RTCStatsReport> create(const String& id, const String& type, double timestamp);
41 41
42 double timestamp() const { return m_timestamp; } 42 double timestamp() const { return m_timestamp; }
43 String id() { return m_id; } 43 String id() { return m_id; }
44 String type() { return m_type; } 44 String type() { return m_type; }
45 String stat(const String& name) { return m_stats.get(name); } 45 String stat(const String& name) { return m_stats.get(name); }
46 Vector<String> names() const; 46 Vector<String> names() const;
47 47
48 // DEPRECATED 48 // DEPRECATED
49 const PassRefPtr<RTCStatsReport> local(); 49 const PassRefPtrWillBeRawPtr<RTCStatsReport> local();
50 // DEPRECATED 50 // DEPRECATED
51 const PassRefPtr<RTCStatsReport> remote(); 51 const PassRefPtrWillBeRawPtr<RTCStatsReport> remote();
52 52
53 void addStatistic(const String& name, const String& value); 53 void addStatistic(const String& name, const String& value);
54 54
55 void trace(Visitor*) { }
56
55 private: 57 private:
56 RTCStatsReport(const String& id, const String& type, double timestamp); 58 RTCStatsReport(const String& id, const String& type, double timestamp);
57 59
58 String m_id; 60 String m_id;
59 String m_type; 61 String m_type;
60 double m_timestamp; 62 double m_timestamp;
61 HashMap<String, String> m_stats; 63 HashMap<String, String> m_stats;
62 }; 64 };
63 65
64 } // namespace WebCore 66 } // namespace WebCore
65 67
66 #endif // RTCStatsReport_h 68 #endif // RTCStatsReport_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698