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 3459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3470 } | 3470 } |
3471 | 3471 |
3472 void* HTMLMediaElement::preDispatchEventHandler(Event* event) | 3472 void* HTMLMediaElement::preDispatchEventHandler(Event* event) |
3473 { | 3473 { |
3474 if (event && event->type() == EventTypeNames::webkitfullscreenchange) | 3474 if (event && event->type() == EventTypeNames::webkitfullscreenchange) |
3475 configureMediaControls(); | 3475 configureMediaControls(); |
3476 | 3476 |
3477 return nullptr; | 3477 return nullptr; |
3478 } | 3478 } |
3479 | 3479 |
3480 // TODO(srirama.m): Refactor this and other relevant methods and have a | 3480 // TODO(srirama.m): Refactor this and clearMediaPlayer to the extent possible. |
3481 // single method for clearing the mediaplayer and its stuff. | |
3482 void HTMLMediaElement::resetMediaPlayerAndMediaSource() | 3481 void HTMLMediaElement::resetMediaPlayerAndMediaSource() |
3483 { | 3482 { |
3484 AudioSourceProviderClientLockScope scope(*this); | |
3485 | |
3486 closeMediaSource(); | 3483 closeMediaSource(); |
3487 | 3484 |
3488 if (m_webMediaPlayer) { | 3485 { |
3489 #if ENABLE(WEB_AUDIO) | 3486 AudioSourceProviderClientLockScope scope(*this); |
3490 m_audioSourceProvider.wrap(nullptr); | 3487 clearMediaPlayerAndAudioSourceProviderClientWithoutLocking(); |
3491 #endif | |
3492 m_webMediaPlayer.clear(); | |
3493 } | 3488 } |
3494 | 3489 |
3495 // We haven't yet found out if any remote routes are available. | 3490 // We haven't yet found out if any remote routes are available. |
3496 m_remoteRoutesAvailable = false; | 3491 m_remoteRoutesAvailable = false; |
3497 m_playingRemotely = false; | 3492 m_playingRemotely = false; |
3498 | 3493 |
3499 #if ENABLE(WEB_AUDIO) | 3494 #if ENABLE(WEB_AUDIO) |
3500 if (m_audioSourceNode) | 3495 if (m_audioSourceNode) |
3501 audioSourceProvider().setClient(m_audioSourceNode); | 3496 audioSourceProvider().setClient(m_audioSourceNode); |
3502 #endif | 3497 #endif |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3782 visitor->trace(m_client); | 3777 visitor->trace(m_client); |
3783 } | 3778 } |
3784 | 3779 |
3785 DEFINE_TRACE(HTMLMediaElement::AudioSourceProviderImpl) | 3780 DEFINE_TRACE(HTMLMediaElement::AudioSourceProviderImpl) |
3786 { | 3781 { |
3787 visitor->trace(m_client); | 3782 visitor->trace(m_client); |
3788 } | 3783 } |
3789 #endif | 3784 #endif |
3790 | 3785 |
3791 } | 3786 } |
OLD | NEW |