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

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: minor decrufting. 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 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
3580 // or if its media controller position is either before the media resource's earliest possible 3580 // or if its media controller position is either before the media resource's earliest possible
3581 // position relative to the MediaController's timeline or after the end of t he media resource 3581 // position relative to the MediaController's timeline or after the end of t he media resource
3582 // relative to the MediaController's timeline. 3582 // relative to the MediaController's timeline.
3583 double mediaControllerPosition = m_mediaController->currentTime(); 3583 double mediaControllerPosition = m_mediaController->currentTime();
3584 if (mediaControllerPosition < 0 || mediaControllerPosition > duration()) 3584 if (mediaControllerPosition < 0 || mediaControllerPosition > duration())
3585 return true; 3585 return true;
3586 3586
3587 return false; 3587 return false;
3588 } 3588 }
3589 3589
3590 void HTMLMediaElement::setAllowHiddenAudioElements(bool allow)
3591 {
3592 ensureMediaControls();
3593 mediaControls()->setAllowHiddenAudioElements(allow);
3594 }
3595
3590 WebMediaPlayer::CORSMode HTMLMediaElement::corsMode() const 3596 WebMediaPlayer::CORSMode HTMLMediaElement::corsMode() const
3591 { 3597 {
3592 const AtomicString& crossOriginMode = fastGetAttribute(crossoriginAttr); 3598 const AtomicString& crossOriginMode = fastGetAttribute(crossoriginAttr);
3593 if (crossOriginMode.isNull()) 3599 if (crossOriginMode.isNull())
3594 return WebMediaPlayer::CORSModeUnspecified; 3600 return WebMediaPlayer::CORSModeUnspecified;
3595 if (equalIgnoringCase(crossOriginMode, "use-credentials")) 3601 if (equalIgnoringCase(crossOriginMode, "use-credentials"))
3596 return WebMediaPlayer::CORSModeUseCredentials; 3602 return WebMediaPlayer::CORSModeUseCredentials;
3597 return WebMediaPlayer::CORSModeAnonymous; 3603 return WebMediaPlayer::CORSModeAnonymous;
3598 } 3604 }
3599 3605
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
3690 3696
3691 #if ENABLE(WEB_AUDIO) 3697 #if ENABLE(WEB_AUDIO)
3692 void HTMLMediaElement::clearWeakMembers(Visitor* visitor) 3698 void HTMLMediaElement::clearWeakMembers(Visitor* visitor)
3693 { 3699 {
3694 if (!Heap::isHeapObjectAlive(m_audioSourceNode) && audioSourceProvider()) 3700 if (!Heap::isHeapObjectAlive(m_audioSourceNode) && audioSourceProvider())
3695 audioSourceProvider()->setClient(nullptr); 3701 audioSourceProvider()->setClient(nullptr);
3696 } 3702 }
3697 #endif 3703 #endif
3698 3704
3699 } 3705 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698