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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 AudioSourceProviderClient* audioSourceNode() { return m_audioSourceNode; } | 259 AudioSourceProviderClient* audioSourceNode() { return m_audioSourceNode; } |
260 void setAudioSourceNode(AudioSourceProviderClient*); | 260 void setAudioSourceNode(AudioSourceProviderClient*); |
261 | 261 |
262 AudioSourceProvider* audioSourceProvider(); | 262 AudioSourceProvider* audioSourceProvider(); |
263 #endif | 263 #endif |
264 | 264 |
265 enum InvalidURLAction { DoNothing, Complain }; | 265 enum InvalidURLAction { DoNothing, Complain }; |
266 bool isSafeToLoadURL(const KURL&, InvalidURLAction); | 266 bool isSafeToLoadURL(const KURL&, InvalidURLAction); |
267 | 267 |
268 MediaController* controller() const; | 268 MediaController* controller() const; |
269 void setController(PassRefPtr<MediaController>); // Resets the MediaGroup an
d sets the MediaController. | 269 void setController(PassRefPtrWillBeRawPtr<MediaController>); // Resets the M
ediaGroup and sets the MediaController. |
270 | 270 |
271 void scheduleEvent(PassRefPtrWillBeRawPtr<Event>); | 271 void scheduleEvent(PassRefPtrWillBeRawPtr<Event>); |
272 | 272 |
273 // Current volume that should be used by the webMediaPlayer(). This method t
akes muted state | 273 // Current volume that should be used by the webMediaPlayer(). This method t
akes muted state |
274 // and m_mediaController multipliers into account. | 274 // and m_mediaController multipliers into account. |
275 double playerVolume() const; | 275 double playerVolume() const; |
276 | 276 |
277 #if ENABLE(OILPAN) | 277 #if ENABLE(OILPAN) |
278 bool isFinalizing() const { return m_isFinalizing; } | 278 bool isFinalizing() const { return m_isFinalizing; } |
279 #endif | 279 #endif |
280 | 280 |
281 protected: | 281 protected: |
282 HTMLMediaElement(const QualifiedName&, Document&); | 282 HTMLMediaElement(const QualifiedName&, Document&); |
283 virtual ~HTMLMediaElement(); | 283 virtual ~HTMLMediaElement(); |
284 | 284 |
285 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; | 285 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; |
286 virtual void finishParsingChildren() OVERRIDE FINAL; | 286 virtual void finishParsingChildren() OVERRIDE FINAL; |
287 virtual bool isURLAttribute(const Attribute&) const OVERRIDE; | 287 virtual bool isURLAttribute(const Attribute&) const OVERRIDE; |
288 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE; | 288 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE; |
289 | 289 |
290 virtual void didMoveToNewDocument(Document& oldDocument) OVERRIDE; | 290 virtual void didMoveToNewDocument(Document& oldDocument) OVERRIDE; |
291 | 291 |
292 enum DisplayMode { Unknown, Poster, PosterWaitingForVideo, Video }; | 292 enum DisplayMode { Unknown, Poster, PosterWaitingForVideo, Video }; |
293 DisplayMode displayMode() const { return m_displayMode; } | 293 DisplayMode displayMode() const { return m_displayMode; } |
294 virtual void setDisplayMode(DisplayMode mode) { m_displayMode = mode; } | 294 virtual void setDisplayMode(DisplayMode mode) { m_displayMode = mode; } |
295 | 295 |
296 void setControllerInternal(PassRefPtr<MediaController>); | 296 void setControllerInternal(PassRefPtrWillBeRawPtr<MediaController>); |
297 | 297 |
298 bool ignoreTrackDisplayUpdateRequests() const { return m_ignoreTrackDisplayU
pdate > 0; } | 298 bool ignoreTrackDisplayUpdateRequests() const { return m_ignoreTrackDisplayU
pdate > 0; } |
299 void beginIgnoringTrackDisplayUpdateRequests(); | 299 void beginIgnoringTrackDisplayUpdateRequests(); |
300 void endIgnoringTrackDisplayUpdateRequests(); | 300 void endIgnoringTrackDisplayUpdateRequests(); |
301 | 301 |
302 private: | 302 private: |
303 void createMediaPlayer(); | 303 void createMediaPlayer(); |
304 | 304 |
305 virtual bool alwaysCreateUserAgentShadowRoot() const OVERRIDE FINAL { return
true; } | 305 virtual bool alwaysCreateUserAgentShadowRoot() const OVERRIDE FINAL { return
true; } |
306 virtual bool areAuthorShadowsAllowed() const OVERRIDE FINAL { return false;
} | 306 virtual bool areAuthorShadowsAllowed() const OVERRIDE FINAL { return false;
} |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 | 517 |
518 CueList m_currentlyActiveCues; | 518 CueList m_currentlyActiveCues; |
519 int m_ignoreTrackDisplayUpdate; | 519 int m_ignoreTrackDisplayUpdate; |
520 | 520 |
521 #if ENABLE(WEB_AUDIO) | 521 #if ENABLE(WEB_AUDIO) |
522 // This is a weak reference, since m_audioSourceNode holds a reference to us
. | 522 // This is a weak reference, since m_audioSourceNode holds a reference to us
. |
523 AudioSourceProviderClient* m_audioSourceNode; | 523 AudioSourceProviderClient* m_audioSourceNode; |
524 #endif | 524 #endif |
525 | 525 |
526 friend class MediaController; | 526 friend class MediaController; |
527 RefPtr<MediaController> m_mediaController; | 527 RefPtrWillBeMember<MediaController> m_mediaController; |
528 | 528 |
529 friend class Internals; | 529 friend class Internals; |
530 friend class TrackDisplayUpdateScope; | 530 friend class TrackDisplayUpdateScope; |
531 | 531 |
532 static URLRegistry* s_mediaStreamRegistry; | 532 static URLRegistry* s_mediaStreamRegistry; |
533 }; | 533 }; |
534 | 534 |
535 #ifndef NDEBUG | 535 #ifndef NDEBUG |
536 // Template specializations required by PodIntervalTree in debug mode. | 536 // Template specializations required by PodIntervalTree in debug mode. |
537 template <> | 537 template <> |
(...skipping 21 matching lines...) Expand all Loading... |
559 inline bool isHTMLMediaElement(const HTMLElement& element) | 559 inline bool isHTMLMediaElement(const HTMLElement& element) |
560 { | 560 { |
561 return isHTMLAudioElement(element) || isHTMLVideoElement(element); | 561 return isHTMLAudioElement(element) || isHTMLVideoElement(element); |
562 } | 562 } |
563 | 563 |
564 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); | 564 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); |
565 | 565 |
566 } //namespace | 566 } //namespace |
567 | 567 |
568 #endif | 568 #endif |
OLD | NEW |