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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 void setController(PassRefPtrWillBeRawPtr<MediaController>); // Resets the M
ediaGroup and sets the MediaController. | 285 void setController(PassRefPtrWillBeRawPtr<MediaController>); // Resets the M
ediaGroup and sets the MediaController. |
286 | 286 |
287 void scheduleEvent(PassRefPtrWillBeRawPtr<Event>); | 287 void scheduleEvent(PassRefPtrWillBeRawPtr<Event>); |
288 | 288 |
289 // Current volume that should be used by the webMediaPlayer(). This method t
akes muted state | 289 // Current volume that should be used by the webMediaPlayer(). This method t
akes muted state |
290 // and m_mediaController multipliers into account. | 290 // and m_mediaController multipliers into account. |
291 double playerVolume() const; | 291 double playerVolume() const; |
292 | 292 |
293 #if ENABLE(OILPAN) | 293 #if ENABLE(OILPAN) |
294 bool isFinalizing() const { return m_isFinalizing; } | 294 bool isFinalizing() const { return m_isFinalizing; } |
| 295 |
| 296 // Oilpan: finalization of the media element is observable from its |
| 297 // attached MediaSource; it entering a closed state. |
| 298 // |
| 299 // Express that by having the MediaSource keep a weak reference |
| 300 // to the media element and signal that it wants to be notified |
| 301 // of destruction if it survives a GC, but the media element |
| 302 // doesn't. |
| 303 void setCloseMediaSourceWhenFinalizing(); |
295 #endif | 304 #endif |
296 | 305 |
297 protected: | 306 protected: |
298 HTMLMediaElement(const QualifiedName&, Document&); | 307 HTMLMediaElement(const QualifiedName&, Document&); |
299 virtual ~HTMLMediaElement(); | 308 virtual ~HTMLMediaElement(); |
300 | 309 |
301 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; | 310 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; |
302 virtual void finishParsingChildren() OVERRIDE FINAL; | 311 virtual void finishParsingChildren() OVERRIDE FINAL; |
303 virtual bool isURLAttribute(const Attribute&) const OVERRIDE; | 312 virtual bool isURLAttribute(const Attribute&) const OVERRIDE; |
304 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE; | 313 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE; |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 DeferredLoadState m_deferredLoadState; | 526 DeferredLoadState m_deferredLoadState; |
518 Timer<HTMLMediaElement> m_deferredLoadTimer; | 527 Timer<HTMLMediaElement> m_deferredLoadTimer; |
519 | 528 |
520 OwnPtr<MediaPlayer> m_player; | 529 OwnPtr<MediaPlayer> m_player; |
521 blink::WebLayer* m_webLayer; | 530 blink::WebLayer* m_webLayer; |
522 | 531 |
523 MediaPlayer::Preload m_preload; | 532 MediaPlayer::Preload m_preload; |
524 | 533 |
525 DisplayMode m_displayMode; | 534 DisplayMode m_displayMode; |
526 | 535 |
527 RefPtr<HTMLMediaSource> m_mediaSource; | 536 RefPtrWillBeMember<HTMLMediaSource> m_mediaSource; |
528 | 537 |
529 mutable double m_cachedTime; | 538 mutable double m_cachedTime; |
530 mutable double m_cachedTimeWallClockUpdateTime; | 539 mutable double m_cachedTimeWallClockUpdateTime; |
531 mutable double m_minimumWallClockTimeToCacheMediaTime; | 540 mutable double m_minimumWallClockTimeToCacheMediaTime; |
532 | 541 |
533 double m_fragmentStartTime; | 542 double m_fragmentStartTime; |
534 double m_fragmentEndTime; | 543 double m_fragmentEndTime; |
535 | 544 |
536 typedef unsigned PendingActionFlags; | 545 typedef unsigned PendingActionFlags; |
537 PendingActionFlags m_pendingActionFlags; | 546 PendingActionFlags m_pendingActionFlags; |
(...skipping 21 matching lines...) Expand all Loading... |
559 | 568 |
560 bool m_completelyLoaded : 1; | 569 bool m_completelyLoaded : 1; |
561 bool m_havePreparedToPlay : 1; | 570 bool m_havePreparedToPlay : 1; |
562 bool m_delayingLoadForPreloadNone : 1; | 571 bool m_delayingLoadForPreloadNone : 1; |
563 | 572 |
564 bool m_tracksAreReady : 1; | 573 bool m_tracksAreReady : 1; |
565 bool m_haveVisibleTextTrack : 1; | 574 bool m_haveVisibleTextTrack : 1; |
566 bool m_processingPreferenceChange : 1; | 575 bool m_processingPreferenceChange : 1; |
567 #if ENABLE(OILPAN) | 576 #if ENABLE(OILPAN) |
568 bool m_isFinalizing : 1; | 577 bool m_isFinalizing : 1; |
| 578 bool m_closeMediaSourceWhenFinalizing : 1; |
569 #endif | 579 #endif |
570 double m_lastTextTrackUpdateTime; | 580 double m_lastTextTrackUpdateTime; |
571 | 581 |
572 RefPtrWillBeMember<AudioTrackList> m_audioTracks; | 582 RefPtrWillBeMember<AudioTrackList> m_audioTracks; |
573 RefPtrWillBeMember<VideoTrackList> m_videoTracks; | 583 RefPtrWillBeMember<VideoTrackList> m_videoTracks; |
574 RefPtrWillBeMember<TextTrackList> m_textTracks; | 584 RefPtrWillBeMember<TextTrackList> m_textTracks; |
575 WillBeHeapVector<RefPtrWillBeMember<TextTrack> > m_textTracksWhenResourceSel
ectionBegan; | 585 WillBeHeapVector<RefPtrWillBeMember<TextTrack> > m_textTracksWhenResourceSel
ectionBegan; |
576 | 586 |
577 CueIntervalTree m_cueTree; | 587 CueIntervalTree m_cueTree; |
578 | 588 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
621 inline bool isHTMLMediaElement(const HTMLElement& element) | 631 inline bool isHTMLMediaElement(const HTMLElement& element) |
622 { | 632 { |
623 return isHTMLAudioElement(element) || isHTMLVideoElement(element); | 633 return isHTMLAudioElement(element) || isHTMLVideoElement(element); |
624 } | 634 } |
625 | 635 |
626 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); | 636 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); |
627 | 637 |
628 } //namespace | 638 } //namespace |
629 | 639 |
630 #endif | 640 #endif |
OLD | NEW |