OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 26 matching lines...) Expand all Loading... |
37 | 37 |
38 namespace blink { | 38 namespace blink { |
39 | 39 |
40 SourceBufferList::SourceBufferList(ExecutionContext* context, | 40 SourceBufferList::SourceBufferList(ExecutionContext* context, |
41 GenericEventQueue* asyncEventQueue) | 41 GenericEventQueue* asyncEventQueue) |
42 : m_executionContext(context), m_asyncEventQueue(asyncEventQueue) {} | 42 : m_executionContext(context), m_asyncEventQueue(asyncEventQueue) {} |
43 | 43 |
44 SourceBufferList::~SourceBufferList() {} | 44 SourceBufferList::~SourceBufferList() {} |
45 | 45 |
46 void SourceBufferList::add(SourceBuffer* buffer) { | 46 void SourceBufferList::add(SourceBuffer* buffer) { |
47 m_list.append(buffer); | 47 m_list.push_back(buffer); |
48 scheduleEvent(EventTypeNames::addsourcebuffer); | 48 scheduleEvent(EventTypeNames::addsourcebuffer); |
49 } | 49 } |
50 | 50 |
51 void SourceBufferList::insert(size_t position, SourceBuffer* buffer) { | 51 void SourceBufferList::insert(size_t position, SourceBuffer* buffer) { |
52 m_list.insert(position, buffer); | 52 m_list.insert(position, buffer); |
53 scheduleEvent(EventTypeNames::addsourcebuffer); | 53 scheduleEvent(EventTypeNames::addsourcebuffer); |
54 } | 54 } |
55 | 55 |
56 void SourceBufferList::remove(SourceBuffer* buffer) { | 56 void SourceBufferList::remove(SourceBuffer* buffer) { |
57 size_t index = m_list.find(buffer); | 57 size_t index = m_list.find(buffer); |
(...skipping 26 matching lines...) Expand all Loading... |
84 } | 84 } |
85 | 85 |
86 DEFINE_TRACE(SourceBufferList) { | 86 DEFINE_TRACE(SourceBufferList) { |
87 visitor->trace(m_executionContext); | 87 visitor->trace(m_executionContext); |
88 visitor->trace(m_asyncEventQueue); | 88 visitor->trace(m_asyncEventQueue); |
89 visitor->trace(m_list); | 89 visitor->trace(m_list); |
90 EventTargetWithInlineData::trace(visitor); | 90 EventTargetWithInlineData::trace(visitor); |
91 } | 91 } |
92 | 92 |
93 } // namespace blink | 93 } // namespace blink |
OLD | NEW |