Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1131)

Side by Side Diff: Source/core/html/HTMLMediaElement.cpp

Issue 1156993013: New media playback UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed my own broken unit test. They really work! Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 3037 matching lines...) Expand 10 before | Expand all | Expand 10 after
3048 stopPeriodicTimers(); 3048 stopPeriodicTimers();
3049 m_loadTimer.stop(); 3049 m_loadTimer.stop();
3050 3050
3051 m_pendingActionFlags &= ~flags; 3051 m_pendingActionFlags &= ~flags;
3052 m_loadState = WaitingForSource; 3052 m_loadState = WaitingForSource;
3053 3053
3054 // We can't cast if we don't have a media player. 3054 // We can't cast if we don't have a media player.
3055 m_remoteRoutesAvailable = false; 3055 m_remoteRoutesAvailable = false;
3056 m_playingRemotely = false; 3056 m_playingRemotely = false;
3057 if (mediaControls()) 3057 if (mediaControls())
3058 mediaControls()->refreshCastButtonVisibility(); 3058 mediaControls()->refreshCastButtonVisibilityWithoutUpdate();
3059 3059
3060 if (m_textTracks) 3060 if (m_textTracks)
3061 configureTextTrackDisplay(AssumeNoVisibleChange); 3061 configureTextTrackDisplay(AssumeNoVisibleChange);
3062 3062
3063 if (layoutObject()) 3063 if (layoutObject())
3064 layoutObject()->setShouldDoFullPaintInvalidation(); 3064 layoutObject()->setShouldDoFullPaintInvalidation();
3065 } 3065 }
3066 3066
3067 void HTMLMediaElement::stop() 3067 void HTMLMediaElement::stop()
3068 { 3068 {
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
3577 // or if its media controller position is either before the media resource's earliest possible 3577 // or if its media controller position is either before the media resource's earliest possible
3578 // position relative to the MediaController's timeline or after the end of t he media resource 3578 // position relative to the MediaController's timeline or after the end of t he media resource
3579 // relative to the MediaController's timeline. 3579 // relative to the MediaController's timeline.
3580 double mediaControllerPosition = m_mediaController->currentTime(); 3580 double mediaControllerPosition = m_mediaController->currentTime();
3581 if (mediaControllerPosition < 0 || mediaControllerPosition > duration()) 3581 if (mediaControllerPosition < 0 || mediaControllerPosition > duration())
3582 return true; 3582 return true;
3583 3583
3584 return false; 3584 return false;
3585 } 3585 }
3586 3586
3587 void HTMLMediaElement::setAllowHiddenAudioElements(bool allow)
3588 {
3589 if (mediaControls())
philipj_slow 2015/07/14 11:16:22 ensureMediaControls() instead of the null check wo
liberato (no reviews please) 2015/07/14 22:10:37 done. i chose the null check because it's unclear
3590 mediaControls()->setAllowHiddenAudioElements(allow);
3591 }
3592
3587 WebMediaPlayer::CORSMode HTMLMediaElement::corsMode() const 3593 WebMediaPlayer::CORSMode HTMLMediaElement::corsMode() const
3588 { 3594 {
3589 const AtomicString& crossOriginMode = fastGetAttribute(crossoriginAttr); 3595 const AtomicString& crossOriginMode = fastGetAttribute(crossoriginAttr);
3590 if (crossOriginMode.isNull()) 3596 if (crossOriginMode.isNull())
3591 return WebMediaPlayer::CORSModeUnspecified; 3597 return WebMediaPlayer::CORSModeUnspecified;
3592 if (equalIgnoringCase(crossOriginMode, "use-credentials")) 3598 if (equalIgnoringCase(crossOriginMode, "use-credentials"))
3593 return WebMediaPlayer::CORSModeUseCredentials; 3599 return WebMediaPlayer::CORSModeUseCredentials;
3594 return WebMediaPlayer::CORSModeAnonymous; 3600 return WebMediaPlayer::CORSModeAnonymous;
3595 } 3601 }
3596 3602
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
3687 3693
3688 #if ENABLE(WEB_AUDIO) 3694 #if ENABLE(WEB_AUDIO)
3689 void HTMLMediaElement::clearWeakMembers(Visitor* visitor) 3695 void HTMLMediaElement::clearWeakMembers(Visitor* visitor)
3690 { 3696 {
3691 if (!Heap::isHeapObjectAlive(m_audioSourceNode) && audioSourceProvider()) 3697 if (!Heap::isHeapObjectAlive(m_audioSourceNode) && audioSourceProvider())
3692 audioSourceProvider()->setClient(nullptr); 3698 audioSourceProvider()->setClient(nullptr);
3693 } 3699 }
3694 #endif 3700 #endif
3695 3701
3696 } 3702 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698