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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 | 89 |
90 WebKit::WebLayer* platformLayer() const; | 90 WebKit::WebLayer* platformLayer() const; |
91 | 91 |
92 enum DelayedActionType { | 92 enum DelayedActionType { |
93 LoadMediaResource = 1 << 0, | 93 LoadMediaResource = 1 << 0, |
94 LoadTextTrackResource = 1 << 1, | 94 LoadTextTrackResource = 1 << 1, |
95 TextTrackChangesNotification = 1 << 2 | 95 TextTrackChangesNotification = 1 << 2 |
96 }; | 96 }; |
97 void scheduleDelayedAction(DelayedActionType); | 97 void scheduleDelayedAction(DelayedActionType); |
98 | 98 |
99 bool inActiveDocument() const { return m_inActiveDocument; } | 99 bool isActive() const { return m_active; } |
100 | 100 |
101 // DOM API | 101 // DOM API |
102 // error state | 102 // error state |
103 PassRefPtr<MediaError> error() const; | 103 PassRefPtr<MediaError> error() const; |
104 | 104 |
105 // network state | 105 // network state |
106 void setSrc(const String&); | 106 void setSrc(const String&); |
107 const KURL& currentSrc() const { return m_currentSrc; } | 107 const KURL& currentSrc() const { return m_currentSrc; } |
108 | 108 |
109 enum NetworkState { NETWORK_EMPTY, NETWORK_IDLE, NETWORK_LOADING, NETWORK_NO
_SOURCE }; | 109 enum NetworkState { NETWORK_EMPTY, NETWORK_IDLE, NETWORK_LOADING, NETWORK_NO
_SOURCE }; |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 mutable double m_cachedTime; | 507 mutable double m_cachedTime; |
508 mutable double m_cachedTimeWallClockUpdateTime; | 508 mutable double m_cachedTimeWallClockUpdateTime; |
509 mutable double m_minimumWallClockTimeToCacheMediaTime; | 509 mutable double m_minimumWallClockTimeToCacheMediaTime; |
510 | 510 |
511 double m_fragmentStartTime; | 511 double m_fragmentStartTime; |
512 double m_fragmentEndTime; | 512 double m_fragmentEndTime; |
513 | 513 |
514 typedef unsigned PendingActionFlags; | 514 typedef unsigned PendingActionFlags; |
515 PendingActionFlags m_pendingActionFlags; | 515 PendingActionFlags m_pendingActionFlags; |
516 | 516 |
| 517 // FIXME: MediaElement has way too many state bits. |
517 bool m_playing : 1; | 518 bool m_playing : 1; |
518 bool m_shouldDelayLoadEvent : 1; | 519 bool m_shouldDelayLoadEvent : 1; |
519 bool m_haveFiredLoadedData : 1; | 520 bool m_haveFiredLoadedData : 1; |
520 bool m_inActiveDocument : 1; | 521 bool m_active : 1; |
521 bool m_autoplaying : 1; | 522 bool m_autoplaying : 1; |
522 bool m_muted : 1; | 523 bool m_muted : 1; |
523 bool m_paused : 1; | 524 bool m_paused : 1; |
524 bool m_seeking : 1; | 525 bool m_seeking : 1; |
525 | 526 |
526 // data has not been loaded since sending a "stalled" event | 527 // data has not been loaded since sending a "stalled" event |
527 bool m_sentStalledEvent : 1; | 528 bool m_sentStalledEvent : 1; |
528 | 529 |
529 // time has not changed since sending an "ended" event | 530 // time has not changed since sending an "ended" event |
530 bool m_sentEndEvent : 1; | 531 bool m_sentEndEvent : 1; |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 inline bool isHTMLMediaElement(const Node& node) | 601 inline bool isHTMLMediaElement(const Node& node) |
601 { | 602 { |
602 return node.isElementNode() && toElement(node).isMediaElement(); | 603 return node.isElementNode() && toElement(node).isMediaElement(); |
603 } | 604 } |
604 | 605 |
605 DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); | 606 DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); |
606 | 607 |
607 } //namespace | 608 } //namespace |
608 | 609 |
609 #endif | 610 #endif |
OLD | NEW |