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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 ASSERT(m_list.isEmpty()); | 50 ASSERT(m_list.isEmpty()); |
51 #endif | 51 #endif |
52 } | 52 } |
53 | 53 |
54 void SourceBufferList::add(SourceBuffer* buffer) | 54 void SourceBufferList::add(SourceBuffer* buffer) |
55 { | 55 { |
56 m_list.append(buffer); | 56 m_list.append(buffer); |
57 scheduleEvent(EventTypeNames::addsourcebuffer); | 57 scheduleEvent(EventTypeNames::addsourcebuffer); |
58 } | 58 } |
59 | 59 |
| 60 void SourceBufferList::insert(size_t position, SourceBuffer* buffer) |
| 61 { |
| 62 m_list.insert(position, buffer); |
| 63 scheduleEvent(EventTypeNames::addsourcebuffer); |
| 64 } |
| 65 |
60 void SourceBufferList::remove(SourceBuffer* buffer) | 66 void SourceBufferList::remove(SourceBuffer* buffer) |
61 { | 67 { |
62 size_t index = m_list.find(buffer); | 68 size_t index = m_list.find(buffer); |
63 if (index == kNotFound) | 69 if (index == kNotFound) |
64 return; | 70 return; |
65 m_list.remove(index); | 71 m_list.remove(index); |
66 scheduleEvent(EventTypeNames::removesourcebuffer); | 72 scheduleEvent(EventTypeNames::removesourcebuffer); |
67 } | 73 } |
68 | 74 |
69 void SourceBufferList::clear() | 75 void SourceBufferList::clear() |
(...skipping 22 matching lines...) Expand all Loading... |
92 return m_executionContext; | 98 return m_executionContext; |
93 } | 99 } |
94 | 100 |
95 void SourceBufferList::trace(Visitor* visitor) | 101 void SourceBufferList::trace(Visitor* visitor) |
96 { | 102 { |
97 visitor->trace(m_list); | 103 visitor->trace(m_list); |
98 EventTargetWithInlineData::trace(visitor); | 104 EventTargetWithInlineData::trace(visitor); |
99 } | 105 } |
100 | 106 |
101 } // namespace blink | 107 } // namespace blink |
OLD | NEW |