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 23 matching lines...) Expand all Loading... |
34 #include "bindings/v8/ScriptWrappable.h" | 34 #include "bindings/v8/ScriptWrappable.h" |
35 #include "core/events/EventTarget.h" | 35 #include "core/events/EventTarget.h" |
36 #include "wtf/RefCounted.h" | 36 #include "wtf/RefCounted.h" |
37 #include "wtf/Vector.h" | 37 #include "wtf/Vector.h" |
38 | 38 |
39 namespace WebCore { | 39 namespace WebCore { |
40 | 40 |
41 class SourceBuffer; | 41 class SourceBuffer; |
42 class GenericEventQueue; | 42 class GenericEventQueue; |
43 | 43 |
44 class SourceBufferList : public RefCounted<SourceBufferList>, public ScriptWrapp
able, public EventTargetWithInlineData { | 44 class SourceBufferList FINAL : public RefCounted<SourceBufferList>, public Scrip
tWrappable, public EventTargetWithInlineData { |
45 REFCOUNTED_EVENT_TARGET(SourceBufferList); | 45 REFCOUNTED_EVENT_TARGET(SourceBufferList); |
46 public: | 46 public: |
47 static PassRefPtr<SourceBufferList> create(ExecutionContext* context, Generi
cEventQueue* asyncEventQueue) | 47 static PassRefPtr<SourceBufferList> create(ExecutionContext* context, Generi
cEventQueue* asyncEventQueue) |
48 { | 48 { |
49 return adoptRef(new SourceBufferList(context, asyncEventQueue)); | 49 return adoptRef(new SourceBufferList(context, asyncEventQueue)); |
50 } | 50 } |
51 virtual ~SourceBufferList(); | 51 virtual ~SourceBufferList(); |
52 | 52 |
53 unsigned long length() const { return m_list.size(); } | 53 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; } | 54 SourceBuffer* item(unsigned long index) const { return (index < m_list.size(
)) ? m_list[index].get() : 0; } |
(...skipping 14 matching lines...) Expand all Loading... |
69 | 69 |
70 ExecutionContext* m_executionContext; | 70 ExecutionContext* m_executionContext; |
71 GenericEventQueue* m_asyncEventQueue; | 71 GenericEventQueue* m_asyncEventQueue; |
72 | 72 |
73 Vector<RefPtr<SourceBuffer> > m_list; | 73 Vector<RefPtr<SourceBuffer> > m_list; |
74 }; | 74 }; |
75 | 75 |
76 } // namespace WebCore | 76 } // namespace WebCore |
77 | 77 |
78 #endif | 78 #endif |
OLD | NEW |