| 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 24 matching lines...) Expand all Loading... |
| 35 #include "platform/heap/Handle.h" | 35 #include "platform/heap/Handle.h" |
| 36 #include "wtf/Vector.h" | 36 #include "wtf/Vector.h" |
| 37 | 37 |
| 38 namespace blink { | 38 namespace blink { |
| 39 | 39 |
| 40 class SourceBuffer; | 40 class SourceBuffer; |
| 41 class GenericEventQueue; | 41 class GenericEventQueue; |
| 42 | 42 |
| 43 class SourceBufferList FINAL : public RefCountedGarbageCollectedWillBeGarbageCol
lectedFinalized<SourceBufferList>, public EventTargetWithInlineData { | 43 class SourceBufferList FINAL : public RefCountedGarbageCollectedWillBeGarbageCol
lectedFinalized<SourceBufferList>, public EventTargetWithInlineData { |
| 44 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<S
ourceBufferList>); | 44 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<S
ourceBufferList>); |
| 45 DEFINE_WRAPPERTYPEINFO(); |
| 45 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(SourceBufferList); | 46 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(SourceBufferList); |
| 46 public: | 47 public: |
| 47 static SourceBufferList* create(ExecutionContext* context, GenericEventQueue
* asyncEventQueue) | 48 static SourceBufferList* create(ExecutionContext* context, GenericEventQueue
* asyncEventQueue) |
| 48 { | 49 { |
| 49 return adoptRefCountedGarbageCollectedWillBeNoop(new SourceBufferList(co
ntext, asyncEventQueue)); | 50 return adoptRefCountedGarbageCollectedWillBeNoop(new SourceBufferList(co
ntext, asyncEventQueue)); |
| 50 } | 51 } |
| 51 virtual ~SourceBufferList(); | 52 virtual ~SourceBufferList(); |
| 52 | 53 |
| 53 unsigned long length() const { return m_list.size(); } | 54 unsigned long length() const { return m_list.size(); } |
| 54 SourceBuffer* item(unsigned long index) const { return (index < m_list.size(
)) ? m_list[index].get() : 0; } | 55 SourceBuffer* item(unsigned long index) const { return (index < m_list.size(
)) ? m_list[index].get() : 0; } |
| (...skipping 15 matching lines...) Expand all Loading... |
| 70 void scheduleEvent(const AtomicString&); | 71 void scheduleEvent(const AtomicString&); |
| 71 | 72 |
| 72 ExecutionContext* m_executionContext; | 73 ExecutionContext* m_executionContext; |
| 73 GenericEventQueue* m_asyncEventQueue; | 74 GenericEventQueue* m_asyncEventQueue; |
| 74 | 75 |
| 75 HeapVector<Member<SourceBuffer> > m_list; | 76 HeapVector<Member<SourceBuffer> > m_list; |
| 76 }; | 77 }; |
| 77 | 78 |
| 78 } // namespace blink | 79 } // namespace blink |
| 79 | 80 |
| 80 #endif | 81 #endif // SourceBufferList_h |
| OLD | NEW |