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

Unified Diff: Source/core/html/track/VTTCue.h

Issue 63173020: Split VTTCue from TextTrackCue (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/track/TextTrackCue.idl ('k') | Source/core/html/track/VTTCue.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/track/VTTCue.h
diff --git a/Source/platform/LengthPoint.h b/Source/core/html/track/VTTCue.h
similarity index 73%
copy from Source/platform/LengthPoint.h
copy to Source/core/html/track/VTTCue.h
index 75497a1dcc3447a9f6d0598f6e67c4ef7eb9cc6d..2f4e4c3592a980f36906fa4ad42a30280db9b499 100644
--- a/Source/platform/LengthPoint.h
+++ b/Source/core/html/track/VTTCue.h
@@ -27,39 +27,28 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef LengthPoint_h
-#define LengthPoint_h
+#ifndef VTTCue_h
+#define VTTCue_h
-#include "platform/Length.h"
+#include "bindings/v8/ScriptWrappable.h"
+#include "core/html/track/TextTrackCue.h"
namespace WebCore {
-struct LengthPoint {
+class VTTCue FINAL : public TextTrackCue, public ScriptWrappable {
public:
- LengthPoint()
- {
- }
-
- LengthPoint(Length x, Length y)
- : m_x(x)
- , m_y(y)
- {
- }
-
- bool operator==(const LengthPoint& o) const { return m_x == o.m_x && m_y == o.m_y; }
- bool operator!=(const LengthPoint& o) const { return m_x != o.m_x || m_y != o.m_y; }
-
- void setX(Length x) { m_x = x; }
- Length x() const { return m_x; }
-
- void setY(Length y) { m_y = y; }
- Length y() const { return m_y; }
+ static PassRefPtr<VTTCue> create(Document&, double startTime, double endTime, const String& text);
private:
- Length m_x;
- Length m_y;
+ VTTCue(Document&, double startTime, double endTime, const String& text);
};
+inline VTTCue* toVTTCue(TextTrackCue* cue)
+{
+ // VTTCue is currently the only TextTrackCue subclass.
+ return static_cast<VTTCue*>(cue);
+}
+
} // namespace WebCore
-#endif // LengthPoint_h
+#endif
« no previous file with comments | « Source/core/html/track/TextTrackCue.idl ('k') | Source/core/html/track/VTTCue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698