OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 23 matching lines...) Expand all Loading... |
34 | 34 |
35 class ScriptExecutionContext; | 35 class ScriptExecutionContext; |
36 | 36 |
37 class TrackBase : public RefCountedGarbageCollected<TrackBase>, public EventTarg
et { | 37 class TrackBase : public RefCountedGarbageCollected<TrackBase>, public EventTarg
et { |
38 DECLARE_GC_INFO | 38 DECLARE_GC_INFO |
39 public: | 39 public: |
40 virtual ~TrackBase(); | 40 virtual ~TrackBase(); |
41 | 41 |
42 virtual void trace(Visitor*) { } | 42 virtual void trace(Visitor*) { } |
43 | 43 |
44 virtual void visitWith(Visitor* visitor) const OVERRIDE | 44 virtual void adjustAndMark(Visitor* visitor) const OVERRIDE |
45 { | 45 { |
46 visitor->visit(this); | 46 visitor->mark(this); |
47 } | 47 } |
48 | 48 |
49 enum Type { BaseTrack, TextTrack, AudioTrack, VideoTrack }; | 49 enum Type { BaseTrack, TextTrack, AudioTrack, VideoTrack }; |
50 Type type() const { return m_type; } | 50 Type type() const { return m_type; } |
51 | 51 |
52 virtual const AtomicString& interfaceName() const; | 52 virtual const AtomicString& interfaceName() const; |
53 virtual ScriptExecutionContext* scriptExecutionContext() const; | 53 virtual ScriptExecutionContext* scriptExecutionContext() const; |
54 | 54 |
55 using RefCountedGarbageCollected<TrackBase>::ref; | 55 using RefCountedGarbageCollected<TrackBase>::ref; |
56 using RefCountedGarbageCollected<TrackBase>::deref; | 56 using RefCountedGarbageCollected<TrackBase>::deref; |
57 | 57 |
58 protected: | 58 protected: |
59 TrackBase(ScriptExecutionContext*, Type); | 59 TrackBase(ScriptExecutionContext*, Type); |
60 | 60 |
61 virtual EventTargetData* eventTargetData(); | 61 virtual EventTargetData* eventTargetData(); |
62 virtual EventTargetData* ensureEventTargetData(); | 62 virtual EventTargetData* ensureEventTargetData(); |
63 | 63 |
64 private: | 64 private: |
65 Type m_type; | 65 Type m_type; |
66 | 66 |
67 ScriptExecutionContext* m_scriptExecutionContext; | 67 ScriptExecutionContext* m_scriptExecutionContext; |
68 EventTargetData m_eventTargetData; | 68 EventTargetData m_eventTargetData; |
69 }; | 69 }; |
70 | 70 |
71 } // namespace WebCore | 71 } // namespace WebCore |
72 | 72 |
73 #endif // TrackBase_h | 73 #endif // TrackBase_h |
OLD | NEW |