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

Side by Side Diff: Source/core/html/track/InbandTextTrack.cpp

Issue 59913005: Remove unused TextTrack virtual functions (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « Source/core/html/track/InbandTextTrack.h ('k') | Source/core/html/track/TextTrack.h » ('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) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 if (mode == TextTrack::disabledKeyword()) 85 if (mode == TextTrack::disabledKeyword())
86 m_private->setMode(InbandTextTrackPrivate::Disabled); 86 m_private->setMode(InbandTextTrackPrivate::Disabled);
87 else if (mode == TextTrack::hiddenKeyword()) 87 else if (mode == TextTrack::hiddenKeyword())
88 m_private->setMode(InbandTextTrackPrivate::Hidden); 88 m_private->setMode(InbandTextTrackPrivate::Hidden);
89 else if (mode == TextTrack::showingKeyword()) 89 else if (mode == TextTrack::showingKeyword())
90 m_private->setMode(InbandTextTrackPrivate::Showing); 90 m_private->setMode(InbandTextTrackPrivate::Showing);
91 else 91 else
92 ASSERT_NOT_REACHED(); 92 ASSERT_NOT_REACHED();
93 } 93 }
94 94
95 bool InbandTextTrack::isClosedCaptions() const
96 {
97 if (!m_private)
98 return false;
99
100 return m_private->isClosedCaptions();
101 }
102
103 bool InbandTextTrack::containsOnlyForcedSubtitles() const
104 {
105 if (!m_private)
106 return false;
107
108 return m_private->containsOnlyForcedSubtitles();
109 }
110
111 bool InbandTextTrack::isMainProgramContent() const
112 {
113 if (!m_private)
114 return false;
115
116 return m_private->isMainProgramContent();
117 }
118
119 bool InbandTextTrack::isEasyToRead() const
120 {
121 if (!m_private)
122 return false;
123
124 return m_private->isEasyToRead();
125 }
126
127 size_t InbandTextTrack::inbandTrackIndex() 95 size_t InbandTextTrack::inbandTrackIndex()
128 { 96 {
129 ASSERT(m_private); 97 ASSERT(m_private);
130 return m_private->textTrackIndex(); 98 return m_private->textTrackIndex();
131 } 99 }
132 100
133 void InbandTextTrack::trackRemoved() 101 void InbandTextTrack::trackRemoved()
134 { 102 {
135 ASSERT(m_private); 103 ASSERT(m_private);
136 m_private->setClient(0); 104 m_private->setClient(0);
137 m_private = 0; 105 m_private = 0;
138 clearClient(); 106 clearClient();
139 } 107 }
140 108
141 void InbandTextTrack::addWebVTTCue(InbandTextTrackPrivate* trackPrivate, double start, double end, const String& id, const String& content, const String& settin gs) 109 void InbandTextTrack::addWebVTTCue(InbandTextTrackPrivate* trackPrivate, double start, double end, const String& id, const String& content, const String& settin gs)
142 { 110 {
143 ASSERT_UNUSED(trackPrivate, trackPrivate == m_private); 111 ASSERT_UNUSED(trackPrivate, trackPrivate == m_private);
144 112
145 RefPtr<TextTrackCue> cue = TextTrackCue::create(document(), start, end, cont ent); 113 RefPtr<TextTrackCue> cue = TextTrackCue::create(document(), start, end, cont ent);
146 cue->setId(id); 114 cue->setId(id);
147 cue->setCueSettings(settings); 115 cue->setCueSettings(settings);
148 116
149 if (hasCue(cue.get())) 117 if (hasCue(cue.get()))
150 return; 118 return;
151 119
152 addCue(cue); 120 addCue(cue);
153 } 121 }
154 122
155 } // namespace WebCore 123 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/track/InbandTextTrack.h ('k') | Source/core/html/track/TextTrack.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698