| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright (C) 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 RTCStatsReport* RTCStatsReport::create(const String& id, const String& type, dou
ble timestamp) | 31 RTCStatsReport* RTCStatsReport::create(const String& id, const String& type, dou
ble timestamp) |
| 32 { | 32 { |
| 33 return new RTCStatsReport(id, type, timestamp); | 33 return new RTCStatsReport(id, type, timestamp); |
| 34 } | 34 } |
| 35 | 35 |
| 36 RTCStatsReport::RTCStatsReport(const String& id, const String& type, double time
stamp) | 36 RTCStatsReport::RTCStatsReport(const String& id, const String& type, double time
stamp) |
| 37 : m_id(id) | 37 : m_id(id) |
| 38 , m_type(type) | 38 , m_type(type) |
| 39 , m_timestamp(timestamp) | 39 , m_timestamp(timestamp) |
| 40 { | 40 { |
| 41 ScriptWrappable::init(this); | |
| 42 } | 41 } |
| 43 | 42 |
| 44 Vector<String> RTCStatsReport::names() const | 43 Vector<String> RTCStatsReport::names() const |
| 45 { | 44 { |
| 46 Vector<String> result; | 45 Vector<String> result; |
| 47 for (HashMap<String, String>::const_iterator it = m_stats.begin(); it != m_s
tats.end(); ++it) { | 46 for (HashMap<String, String>::const_iterator it = m_stats.begin(); it != m_s
tats.end(); ++it) { |
| 48 result.append(it->key); | 47 result.append(it->key); |
| 49 } | 48 } |
| 50 return result; | 49 return result; |
| 51 } | 50 } |
| 52 | 51 |
| 53 RTCStatsReport* RTCStatsReport::local() | 52 RTCStatsReport* RTCStatsReport::local() |
| 54 { | 53 { |
| 55 return this; | 54 return this; |
| 56 } | 55 } |
| 57 | 56 |
| 58 RTCStatsReport* RTCStatsReport::remote() | 57 RTCStatsReport* RTCStatsReport::remote() |
| 59 { | 58 { |
| 60 return this; | 59 return this; |
| 61 } | 60 } |
| 62 | 61 |
| 63 void RTCStatsReport::addStatistic(const String& name, const String& value) | 62 void RTCStatsReport::addStatistic(const String& name, const String& value) |
| 64 { | 63 { |
| 65 m_stats.add(name, value); | 64 m_stats.add(name, value); |
| 66 } | 65 } |
| 67 | 66 |
| 68 } // namespace blink | 67 } // namespace blink |
| OLD | NEW |