| 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 // that text track layout may be updated to avoid overlapping them. | 227 // that text track layout may be updated to avoid overlapping them. |
| 228 void mediaControlsDidBecomeVisible(); | 228 void mediaControlsDidBecomeVisible(); |
| 229 | 229 |
| 230 void sourceWasRemoved(HTMLSourceElement*); | 230 void sourceWasRemoved(HTMLSourceElement*); |
| 231 void sourceWasAdded(HTMLSourceElement*); | 231 void sourceWasAdded(HTMLSourceElement*); |
| 232 | 232 |
| 233 // ActiveDOMObject functions. | 233 // ActiveDOMObject functions. |
| 234 bool hasPendingActivity() const final; | 234 bool hasPendingActivity() const final; |
| 235 | 235 |
| 236 #if ENABLE(WEB_AUDIO) | 236 #if ENABLE(WEB_AUDIO) |
| 237 AudioSourceProviderClient* audioSourceNode(); | 237 AudioSourceProviderClient* audioSourceNode() { return m_audioSourceNode; } |
| 238 void setAudioSourceNode(AudioSourceProviderClient*); | 238 void setAudioSourceNode(AudioSourceProviderClient*); |
| 239 | 239 |
| 240 AudioSourceProvider& audioSourceProvider() { return m_audioSourceProvider; } | 240 AudioSourceProvider& audioSourceProvider() { return m_audioSourceProvider; } |
| 241 #endif | 241 #endif |
| 242 | 242 |
| 243 enum InvalidURLAction { DoNothing, Complain }; | 243 enum InvalidURLAction { DoNothing, Complain }; |
| 244 bool isSafeToLoadURL(const KURL&, InvalidURLAction); | 244 bool isSafeToLoadURL(const KURL&, InvalidURLAction); |
| 245 | 245 |
| 246 // Checks to see if current media data is CORS-same-origin as the | 246 // Checks to see if current media data is CORS-same-origin as the |
| 247 // specified origin. | 247 // specified origin. |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 567 #if ENABLE(WEB_AUDIO) | 567 #if ENABLE(WEB_AUDIO) |
| 568 // This is a weak reference, since m_audioSourceNode holds a reference to us
. | 568 // This is a weak reference, since m_audioSourceNode holds a reference to us
. |
| 569 // FIXME: Oilpan: Consider making this a strongly traced pointer with oilpan
where strong cycles are not a problem. | 569 // FIXME: Oilpan: Consider making this a strongly traced pointer with oilpan
where strong cycles are not a problem. |
| 570 GC_PLUGIN_IGNORE("http://crbug.com/404577") | 570 GC_PLUGIN_IGNORE("http://crbug.com/404577") |
| 571 RawPtrWillBeWeakMember<AudioSourceProviderClient> m_audioSourceNode; | 571 RawPtrWillBeWeakMember<AudioSourceProviderClient> m_audioSourceNode; |
| 572 | 572 |
| 573 // AudioClientImpl wraps an AudioSourceProviderClient. | 573 // AudioClientImpl wraps an AudioSourceProviderClient. |
| 574 // When the audio format is known, Chromium calls setFormat(). | 574 // When the audio format is known, Chromium calls setFormat(). |
| 575 class AudioClientImpl final : public GarbageCollectedFinalized<AudioClientIm
pl>, public WebAudioSourceProviderClient { | 575 class AudioClientImpl final : public GarbageCollectedFinalized<AudioClientIm
pl>, public WebAudioSourceProviderClient { |
| 576 public: | 576 public: |
| 577 explicit AudioClientImpl(AudioSourceProviderClient*); | 577 explicit AudioClientImpl(AudioSourceProviderClient* client) |
| 578 : m_client(client) |
| 579 { |
| 580 } |
| 581 |
| 578 ~AudioClientImpl() override { } | 582 ~AudioClientImpl() override { } |
| 579 | 583 |
| 580 // WebAudioSourceProviderClient | 584 // WebAudioSourceProviderClient |
| 581 void setFormat(size_t numberOfChannels, float sampleRate) override; | 585 void setFormat(size_t numberOfChannels, float sampleRate) override; |
| 582 | 586 |
| 583 DECLARE_TRACE(); | 587 DECLARE_TRACE(); |
| 584 | 588 |
| 585 private: | 589 private: |
| 586 Member<AudioSourceProviderClient> m_client; | 590 Member<AudioSourceProviderClient> m_client; |
| 587 }; | 591 }; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 628 inline bool isHTMLMediaElement(const HTMLElement& element) | 632 inline bool isHTMLMediaElement(const HTMLElement& element) |
| 629 { | 633 { |
| 630 return isHTMLAudioElement(element) || isHTMLVideoElement(element); | 634 return isHTMLAudioElement(element) || isHTMLVideoElement(element); |
| 631 } | 635 } |
| 632 | 636 |
| 633 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); | 637 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); |
| 634 | 638 |
| 635 } // namespace blink | 639 } // namespace blink |
| 636 | 640 |
| 637 #endif // HTMLMediaElement_h | 641 #endif // HTMLMediaElement_h |
| OLD | NEW |