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