OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 14 matching lines...) Expand all Loading... | |
25 | 25 |
26 #ifndef HTMLMediaElement_h | 26 #ifndef HTMLMediaElement_h |
27 #define HTMLMediaElement_h | 27 #define HTMLMediaElement_h |
28 | 28 |
29 #include "core/dom/ActiveDOMObject.h" | 29 #include "core/dom/ActiveDOMObject.h" |
30 #include "core/events/GenericEventQueue.h" | 30 #include "core/events/GenericEventQueue.h" |
31 #include "core/html/HTMLElement.h" | 31 #include "core/html/HTMLElement.h" |
32 #include "core/html/MediaControllerInterface.h" | 32 #include "core/html/MediaControllerInterface.h" |
33 #include "core/html/track/TextTrack.h" | 33 #include "core/html/track/TextTrack.h" |
34 #include "core/html/track/TextTrackCue.h" | 34 #include "core/html/track/TextTrackCue.h" |
35 #include "core/html/track/vtt/VTTCue.h" | |
35 #include "platform/PODIntervalTree.h" | 36 #include "platform/PODIntervalTree.h" |
36 #include "platform/graphics/media/MediaPlayer.h" | 37 #include "platform/graphics/media/MediaPlayer.h" |
37 #include "public/platform/WebMimeRegistry.h" | 38 #include "public/platform/WebMimeRegistry.h" |
38 | 39 |
39 namespace blink { | 40 namespace blink { |
40 class WebInbandTextTrack; | 41 class WebInbandTextTrack; |
41 class WebLayer; | 42 class WebLayer; |
42 } | 43 } |
43 | 44 |
44 namespace WebCore { | 45 namespace WebCore { |
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
574 static String string(const double value) | 575 static String string(const double value) |
575 { | 576 { |
576 return String::number(value); | 577 return String::number(value); |
577 } | 578 } |
578 }; | 579 }; |
579 | 580 |
580 template <> | 581 template <> |
581 struct ValueToString<TextTrackCue*> { | 582 struct ValueToString<TextTrackCue*> { |
582 static String string(TextTrackCue* const& cue) | 583 static String string(TextTrackCue* const& cue) |
583 { | 584 { |
584 return String::format("%p id=%s interval=%f-->%f cue=%s)", cue, cue->id( ).utf8().data(), cue->startTime(), cue->endTime(), cue->text().utf8().data()); | 585 if (cue->isVTTCue()) { |
acolwell GONE FROM CHROMIUM
2013/11/21 19:22:00
nit: It seems like this should be handled by a vir
gasubic
2013/11/22 15:27:34
Done.
| |
586 VTTCue* vttCue = toVTTCue(cue); | |
587 return String::format("%p id=%s interval=%f-->%f cue=%s)", cue, cue- >id().utf8().data(), cue->startTime(), cue->endTime(), vttCue->text().utf8().dat a()); | |
588 } | |
589 return String::format("%p id=%s interval=%f-->%f)", cue, cue->id().utf8( ).data(), cue->startTime(), cue->endTime()); | |
585 } | 590 } |
586 }; | 591 }; |
587 #endif | 592 #endif |
588 | 593 |
589 inline bool isHTMLMediaElement(Node* node) | 594 inline bool isHTMLMediaElement(Node* node) |
590 { | 595 { |
591 return node && node->isElementNode() && toElement(node)->isMediaElement(); | 596 return node && node->isElementNode() && toElement(node)->isMediaElement(); |
592 } | 597 } |
593 | 598 |
594 inline bool isHTMLMediaElement(const Node& node) | 599 inline bool isHTMLMediaElement(const Node& node) |
595 { | 600 { |
596 return node.isElementNode() && toElement(node).isMediaElement(); | 601 return node.isElementNode() && toElement(node).isMediaElement(); |
597 } | 602 } |
598 | 603 |
599 DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); | 604 DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); |
600 | 605 |
601 } //namespace | 606 } //namespace |
602 | 607 |
603 #endif | 608 #endif |
OLD | NEW |