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 3823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3834 setControllerInternal(controller); | 3834 setControllerInternal(controller); |
3835 } | 3835 } |
3836 | 3836 |
3837 void HTMLMediaElement::setControllerInternal(PassRefPtr<MediaController> control
ler) | 3837 void HTMLMediaElement::setControllerInternal(PassRefPtr<MediaController> control
ler) |
3838 { | 3838 { |
3839 if (m_mediaController) | 3839 if (m_mediaController) |
3840 m_mediaController->removeMediaElement(this); | 3840 m_mediaController->removeMediaElement(this); |
3841 | 3841 |
3842 m_mediaController = controller; | 3842 m_mediaController = controller; |
3843 | 3843 |
3844 if (m_mediaController) | 3844 if (m_mediaController) { |
| 3845 UseCounter::count(document(), UseCounter::HTMLMediaElementControllerNotN
ull); |
3845 m_mediaController->addMediaElement(this); | 3846 m_mediaController->addMediaElement(this); |
| 3847 } |
3846 | 3848 |
3847 if (hasMediaControls()) | 3849 if (hasMediaControls()) |
3848 mediaControls()->setMediaController(m_mediaController ? m_mediaControlle
r.get() : static_cast<MediaControllerInterface*>(this)); | 3850 mediaControls()->setMediaController(m_mediaController ? m_mediaControlle
r.get() : static_cast<MediaControllerInterface*>(this)); |
3849 } | 3851 } |
3850 | 3852 |
3851 void HTMLMediaElement::updateMediaController() | 3853 void HTMLMediaElement::updateMediaController() |
3852 { | 3854 { |
3853 if (m_mediaController) | 3855 if (m_mediaController) |
3854 m_mediaController->reportControllerState(); | 3856 m_mediaController->reportControllerState(); |
3855 } | 3857 } |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3962 { | 3964 { |
3963 m_mediaSource->setWebMediaSourceAndOpen(adoptPtr(webMediaSource)); | 3965 m_mediaSource->setWebMediaSourceAndOpen(adoptPtr(webMediaSource)); |
3964 } | 3966 } |
3965 | 3967 |
3966 bool HTMLMediaElement::isInteractiveContent() const | 3968 bool HTMLMediaElement::isInteractiveContent() const |
3967 { | 3969 { |
3968 return fastHasAttribute(controlsAttr); | 3970 return fastHasAttribute(controlsAttr); |
3969 } | 3971 } |
3970 | 3972 |
3971 } | 3973 } |
OLD | NEW |