Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(245)

Side by Side Diff: Source/core/html/track/TextTrack.h

Issue 958903002: Move activeCues ownership to TextTrack (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/html/track/TextTrack.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * Copyright (C) 2011, 2012, 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2011, 2012, 2013 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 static const AtomicString& showingKeyword(); 72 static const AtomicString& showingKeyword();
73 73
74 AtomicString mode() const { return m_mode; } 74 AtomicString mode() const { return m_mode; }
75 virtual void setMode(const AtomicString&); 75 virtual void setMode(const AtomicString&);
76 76
77 enum ReadinessState { NotLoaded = 0, Loading = 1, Loaded = 2, FailedToLoad = 3 }; 77 enum ReadinessState { NotLoaded = 0, Loading = 1, Loaded = 2, FailedToLoad = 3 };
78 ReadinessState readinessState() const { return m_readinessState; } 78 ReadinessState readinessState() const { return m_readinessState; }
79 void setReadinessState(ReadinessState state) { m_readinessState = state; } 79 void setReadinessState(ReadinessState state) { m_readinessState = state; }
80 80
81 TextTrackCueList* cues(); 81 TextTrackCueList* cues();
82 TextTrackCueList* activeCues() const; 82 TextTrackCueList* activeCues();
83 83
84 HTMLMediaElement* mediaElement() const; 84 HTMLMediaElement* mediaElement() const;
85 Node* owner() const; 85 Node* owner() const;
86 86
87 void addCue(PassRefPtrWillBeRawPtr<TextTrackCue>); 87 void addCue(PassRefPtrWillBeRawPtr<TextTrackCue>);
88 void removeCue(TextTrackCue*, ExceptionState&); 88 void removeCue(TextTrackCue*, ExceptionState&);
89 89
90 VTTRegionList* regions(); 90 VTTRegionList* regions();
91 void addRegion(PassRefPtrWillBeRawPtr<VTTRegion>); 91 void addRegion(PassRefPtrWillBeRawPtr<VTTRegion>);
92 void removeRegion(VTTRegion*, ExceptionState&); 92 void removeRegion(VTTRegion*, ExceptionState&);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 virtual bool isValidKind(const AtomicString& kind) const override { return i sValidKindKeyword(kind); } 125 virtual bool isValidKind(const AtomicString& kind) const override { return i sValidKindKeyword(kind); }
126 virtual AtomicString defaultKind() const override { return subtitlesKeyword( ); } 126 virtual AtomicString defaultKind() const override { return subtitlesKeyword( ); }
127 127
128 void addListOfCues(WillBeHeapVector<RefPtrWillBeMember<TextTrackCue>>&); 128 void addListOfCues(WillBeHeapVector<RefPtrWillBeMember<TextTrackCue>>&);
129 129
130 private: 130 private:
131 CueTimeline* cueTimeline() const; 131 CueTimeline* cueTimeline() const;
132 132
133 TextTrackCueList* ensureTextTrackCueList(); 133 TextTrackCueList* ensureTextTrackCueList();
134 RefPtrWillBeMember<TextTrackCueList> m_cues; 134 RefPtrWillBeMember<TextTrackCueList> m_cues;
135 RefPtrWillBeMember<TextTrackCueList> m_activeCues;
135 136
136 VTTRegionList* ensureVTTRegionList(); 137 VTTRegionList* ensureVTTRegionList();
137 RefPtrWillBeMember<VTTRegionList> m_regions; 138 RefPtrWillBeMember<VTTRegionList> m_regions;
138 139
139 RawPtrWillBeMember<TextTrackList> m_trackList; 140 RawPtrWillBeMember<TextTrackList> m_trackList;
140 AtomicString m_mode; 141 AtomicString m_mode;
141 TextTrackType m_trackType; 142 TextTrackType m_trackType;
142 ReadinessState m_readinessState; 143 ReadinessState m_readinessState;
143 int m_trackIndex; 144 int m_trackIndex;
144 int m_renderedTrackIndex; 145 int m_renderedTrackIndex;
145 bool m_hasBeenConfigured; 146 bool m_hasBeenConfigured;
146 }; 147 };
147 148
148 DEFINE_TRACK_TYPE_CASTS(TextTrack, TrackBase::TextTrack); 149 DEFINE_TRACK_TYPE_CASTS(TextTrack, TrackBase::TextTrack);
149 150
150 } // namespace blink 151 } // namespace blink
151 152
152 #endif // TextTrack_h 153 #endif // TextTrack_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/html/track/TextTrack.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698