| OLD | NEW |
| 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 28 matching lines...) Expand all Loading... |
| 39 DEFINE_WRAPPERTYPEINFO(); | 39 DEFINE_WRAPPERTYPEINFO(); |
| 40 | 40 |
| 41 public: | 41 public: |
| 42 static RTCLegacyStatsReport* create(const String& id, | 42 static RTCLegacyStatsReport* create(const String& id, |
| 43 const String& type, | 43 const String& type, |
| 44 double timestamp); | 44 double timestamp); |
| 45 | 45 |
| 46 double timestamp() const { return m_timestamp; } | 46 double timestamp() const { return m_timestamp; } |
| 47 String id() { return m_id; } | 47 String id() { return m_id; } |
| 48 String type() { return m_type; } | 48 String type() { return m_type; } |
| 49 String stat(const String& name) { return m_stats.get(name); } | 49 String stat(const String& name) { return m_stats.at(name); } |
| 50 Vector<String> names() const; | 50 Vector<String> names() const; |
| 51 | 51 |
| 52 void addStatistic(const String& name, const String& value); | 52 void addStatistic(const String& name, const String& value); |
| 53 | 53 |
| 54 DEFINE_INLINE_TRACE() {} | 54 DEFINE_INLINE_TRACE() {} |
| 55 | 55 |
| 56 private: | 56 private: |
| 57 RTCLegacyStatsReport(const String& id, const String& type, double timestamp); | 57 RTCLegacyStatsReport(const String& id, const String& type, double timestamp); |
| 58 | 58 |
| 59 String m_id; | 59 String m_id; |
| 60 String m_type; | 60 String m_type; |
| 61 double m_timestamp; | 61 double m_timestamp; |
| 62 HashMap<String, String> m_stats; | 62 HashMap<String, String> m_stats; |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 } // namespace blink | 65 } // namespace blink |
| 66 | 66 |
| 67 #endif // RTCLegacyStatsReport_h | 67 #endif // RTCLegacyStatsReport_h |
| OLD | NEW |