| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 class ExceptionState; | 53 class ExceptionState; |
| 54 class HTMLSourceElement; | 54 class HTMLSourceElement; |
| 55 class HTMLTrackElement; | 55 class HTMLTrackElement; |
| 56 class KURL; | 56 class KURL; |
| 57 class MediaController; | 57 class MediaController; |
| 58 class MediaControls; | 58 class MediaControls; |
| 59 class MediaError; | 59 class MediaError; |
| 60 class HTMLMediaSource; | 60 class HTMLMediaSource; |
| 61 class TextTrackList; | 61 class TextTrackList; |
| 62 class TimeRanges; | 62 class TimeRanges; |
| 63 #if ENABLE(ENCRYPTED_MEDIA_V2) | |
| 64 class MediaKeys; | 63 class MediaKeys; |
| 65 #endif | |
| 66 | 64 |
| 67 typedef PODIntervalTree<double, TextTrackCue*> CueIntervalTree; | 65 typedef PODIntervalTree<double, TextTrackCue*> CueIntervalTree; |
| 68 typedef CueIntervalTree::IntervalType CueInterval; | 66 typedef CueIntervalTree::IntervalType CueInterval; |
| 69 typedef Vector<CueInterval> CueList; | 67 typedef Vector<CueInterval> CueList; |
| 70 | 68 |
| 71 // FIXME: The inheritance from MediaPlayerClient here should be private inherita
nce. | 69 // FIXME: The inheritance from MediaPlayerClient here should be private inherita
nce. |
| 72 // But it can't be until the Chromium WebMediaPlayerClientImpl class is fixed so
it | 70 // But it can't be until the Chromium WebMediaPlayerClientImpl class is fixed so
it |
| 73 // no longer depends on typecasting a MediaPlayerClient to an HTMLMediaElement. | 71 // no longer depends on typecasting a MediaPlayerClient to an HTMLMediaElement. |
| 74 | 72 |
| 75 class HTMLMediaElement : public HTMLElement, public MediaPlayerClient, public Ac
tiveDOMObject, public MediaControllerInterface | 73 class HTMLMediaElement : public HTMLElement, public MediaPlayerClient, public Ac
tiveDOMObject, public MediaControllerInterface |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 void webkitGenerateKeyRequest(const String& keySystem, ExceptionState&); | 151 void webkitGenerateKeyRequest(const String& keySystem, ExceptionState&); |
| 154 void webkitAddKey(const String& keySystem, PassRefPtr<Uint8Array> key, PassR
efPtr<Uint8Array> initData, const String& sessionId, ExceptionState&); | 152 void webkitAddKey(const String& keySystem, PassRefPtr<Uint8Array> key, PassR
efPtr<Uint8Array> initData, const String& sessionId, ExceptionState&); |
| 155 void webkitAddKey(const String& keySystem, PassRefPtr<Uint8Array> key, Excep
tionState&); | 153 void webkitAddKey(const String& keySystem, PassRefPtr<Uint8Array> key, Excep
tionState&); |
| 156 void webkitCancelKeyRequest(const String& keySystem, const String& sessionId
, ExceptionState&); | 154 void webkitCancelKeyRequest(const String& keySystem, const String& sessionId
, ExceptionState&); |
| 157 | 155 |
| 158 DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitkeyadded); | 156 DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitkeyadded); |
| 159 DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitkeyerror); | 157 DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitkeyerror); |
| 160 DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitkeymessage); | 158 DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitkeymessage); |
| 161 DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitneedkey); | 159 DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitneedkey); |
| 162 | 160 |
| 163 #if ENABLE(ENCRYPTED_MEDIA_V2) | |
| 164 MediaKeys* mediaKeys() const { return m_mediaKeys.get(); } | 161 MediaKeys* mediaKeys() const { return m_mediaKeys.get(); } |
| 165 void setMediaKeys(MediaKeys*); | 162 void setMediaKeys(MediaKeys*); |
| 166 #endif | |
| 167 | 163 |
| 168 // controls | 164 // controls |
| 169 bool controls() const; | 165 bool controls() const; |
| 170 void setControls(bool); | 166 void setControls(bool); |
| 171 double volume() const; | 167 double volume() const; |
| 172 void setVolume(double, ExceptionState&); | 168 void setVolume(double, ExceptionState&); |
| 173 bool muted() const; | 169 bool muted() const; |
| 174 void setMuted(bool); | 170 void setMuted(bool); |
| 175 | 171 |
| 176 void togglePlayState(); | 172 void togglePlayState(); |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 virtual void mediaPlayerPlaybackStateChanged() OVERRIDE; | 352 virtual void mediaPlayerPlaybackStateChanged() OVERRIDE; |
| 357 virtual void mediaPlayerRequestFullscreen() OVERRIDE; | 353 virtual void mediaPlayerRequestFullscreen() OVERRIDE; |
| 358 virtual void mediaPlayerRequestSeek(double) OVERRIDE; | 354 virtual void mediaPlayerRequestSeek(double) OVERRIDE; |
| 359 virtual void mediaPlayerRepaint() OVERRIDE; | 355 virtual void mediaPlayerRepaint() OVERRIDE; |
| 360 virtual void mediaPlayerSizeChanged() OVERRIDE; | 356 virtual void mediaPlayerSizeChanged() OVERRIDE; |
| 361 | 357 |
| 362 virtual void mediaPlayerKeyAdded(const String& keySystem, const String& sess
ionId) OVERRIDE; | 358 virtual void mediaPlayerKeyAdded(const String& keySystem, const String& sess
ionId) OVERRIDE; |
| 363 virtual void mediaPlayerKeyError(const String& keySystem, const String& sess
ionId, MediaPlayerClient::MediaKeyErrorCode, unsigned short systemCode) OVERRIDE
; | 359 virtual void mediaPlayerKeyError(const String& keySystem, const String& sess
ionId, MediaPlayerClient::MediaKeyErrorCode, unsigned short systemCode) OVERRIDE
; |
| 364 virtual void mediaPlayerKeyMessage(const String& keySystem, const String& se
ssionId, const unsigned char* message, unsigned messageLength, const KURL& defau
ltURL) OVERRIDE; | 360 virtual void mediaPlayerKeyMessage(const String& keySystem, const String& se
ssionId, const unsigned char* message, unsigned messageLength, const KURL& defau
ltURL) OVERRIDE; |
| 365 virtual bool mediaPlayerKeyNeeded(const String& keySystem, const String& ses
sionId, const unsigned char* initData, unsigned initDataLength) OVERRIDE; | 361 virtual bool mediaPlayerKeyNeeded(const String& keySystem, const String& ses
sionId, const unsigned char* initData, unsigned initDataLength) OVERRIDE; |
| 366 | |
| 367 #if ENABLE(ENCRYPTED_MEDIA_V2) | |
| 368 virtual bool mediaPlayerKeyNeeded(Uint8Array*) OVERRIDE; | 362 virtual bool mediaPlayerKeyNeeded(Uint8Array*) OVERRIDE; |
| 369 #endif | |
| 370 | 363 |
| 371 virtual CORSMode mediaPlayerCORSMode() const OVERRIDE; | 364 virtual CORSMode mediaPlayerCORSMode() const OVERRIDE; |
| 372 | 365 |
| 373 virtual void mediaPlayerSetWebLayer(blink::WebLayer*) OVERRIDE; | 366 virtual void mediaPlayerSetWebLayer(blink::WebLayer*) OVERRIDE; |
| 374 virtual void mediaPlayerSetOpaque(bool) OVERRIDE; | 367 virtual void mediaPlayerSetOpaque(bool) OVERRIDE; |
| 375 | 368 |
| 376 void loadTimerFired(Timer<HTMLMediaElement>*); | 369 void loadTimerFired(Timer<HTMLMediaElement>*); |
| 377 void progressEventTimerFired(Timer<HTMLMediaElement>*); | 370 void progressEventTimerFired(Timer<HTMLMediaElement>*); |
| 378 void playbackProgressTimerFired(Timer<HTMLMediaElement>*); | 371 void playbackProgressTimerFired(Timer<HTMLMediaElement>*); |
| 379 void startPlaybackProgressTimer(); | 372 void startPlaybackProgressTimer(); |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 // The value is set just after the MediaElementAudioSourceNode is created. | 552 // The value is set just after the MediaElementAudioSourceNode is created. |
| 560 // The value is cleared in MediaElementAudioSourceNode::~MediaElementAudioSo
urceNode(). | 553 // The value is cleared in MediaElementAudioSourceNode::~MediaElementAudioSo
urceNode(). |
| 561 MediaElementAudioSourceNode* m_audioSourceNode; | 554 MediaElementAudioSourceNode* m_audioSourceNode; |
| 562 #endif | 555 #endif |
| 563 | 556 |
| 564 friend class MediaController; | 557 friend class MediaController; |
| 565 RefPtr<MediaController> m_mediaController; | 558 RefPtr<MediaController> m_mediaController; |
| 566 | 559 |
| 567 friend class TrackDisplayUpdateScope; | 560 friend class TrackDisplayUpdateScope; |
| 568 | 561 |
| 569 #if ENABLE(ENCRYPTED_MEDIA_V2) | |
| 570 RefPtr<MediaKeys> m_mediaKeys; | 562 RefPtr<MediaKeys> m_mediaKeys; |
| 571 #endif | |
| 572 }; | 563 }; |
| 573 | 564 |
| 574 #ifndef NDEBUG | 565 #ifndef NDEBUG |
| 575 // Template specializations required by PodIntervalTree in debug mode. | 566 // Template specializations required by PodIntervalTree in debug mode. |
| 576 template <> | 567 template <> |
| 577 struct ValueToString<double> { | 568 struct ValueToString<double> { |
| 578 static String string(const double value) | 569 static String string(const double value) |
| 579 { | 570 { |
| 580 return String::number(value); | 571 return String::number(value); |
| 581 } | 572 } |
| (...skipping 16 matching lines...) Expand all Loading... |
| 598 inline bool isHTMLMediaElement(const Node& node) | 589 inline bool isHTMLMediaElement(const Node& node) |
| 599 { | 590 { |
| 600 return node.isElementNode() && toElement(node).isMediaElement(); | 591 return node.isElementNode() && toElement(node).isMediaElement(); |
| 601 } | 592 } |
| 602 | 593 |
| 603 DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); | 594 DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); |
| 604 | 595 |
| 605 } //namespace | 596 } //namespace |
| 606 | 597 |
| 607 #endif | 598 #endif |
| OLD | NEW |