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

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

Issue 291873002: Eliminate MediaPlayer & MediaPlayerClient abstractions (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed unused function declarations Created 6 years, 7 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 1808 matching lines...) Expand 10 before | Expand all | Expand 10 after
1819 setDisplayMode(Video); 1819 setDisplayMode(Video);
1820 } 1820 }
1821 1821
1822 HTMLMediaElement::ReadyState HTMLMediaElement::readyState() const 1822 HTMLMediaElement::ReadyState HTMLMediaElement::readyState() const
1823 { 1823 {
1824 return m_readyState; 1824 return m_readyState;
1825 } 1825 }
1826 1826
1827 bool HTMLMediaElement::hasAudio() const 1827 bool HTMLMediaElement::hasAudio() const
1828 { 1828 {
1829 return m_player ? m_player->hasAudio() : false; 1829 return webMediaPlayer() ? webMediaPlayer()->hasAudio() : false;
1830 } 1830 }
1831 1831
1832 bool HTMLMediaElement::seeking() const 1832 bool HTMLMediaElement::seeking() const
1833 { 1833 {
1834 return m_seeking; 1834 return m_seeking;
1835 } 1835 }
1836 1836
1837 void HTMLMediaElement::refreshCachedTime() const 1837 void HTMLMediaElement::refreshCachedTime() const
1838 { 1838 {
1839 m_cachedTime = m_player->currentTime(); 1839 m_cachedTime = m_player->currentTime();
(...skipping 1397 matching lines...) Expand 10 before | Expand all | Expand 10 after
3237 3237
3238 m_processingPreferenceChange = true; 3238 m_processingPreferenceChange = true;
3239 markCaptionAndSubtitleTracksAsUnconfigured(); 3239 markCaptionAndSubtitleTracksAsUnconfigured();
3240 m_processingPreferenceChange = false; 3240 m_processingPreferenceChange = false;
3241 3241
3242 updateTextTrackDisplay(); 3242 updateTextTrackDisplay();
3243 } 3243 }
3244 3244
3245 unsigned HTMLMediaElement::webkitAudioDecodedByteCount() const 3245 unsigned HTMLMediaElement::webkitAudioDecodedByteCount() const
3246 { 3246 {
3247 if (!m_player) 3247 if (!webMediaPlayer())
3248 return 0; 3248 return 0;
3249 return m_player->audioDecodedByteCount(); 3249 return webMediaPlayer()->audioDecodedByteCount();
3250 } 3250 }
3251 3251
3252 unsigned HTMLMediaElement::webkitVideoDecodedByteCount() const 3252 unsigned HTMLMediaElement::webkitVideoDecodedByteCount() const
3253 { 3253 {
3254 if (!m_player) 3254 if (!webMediaPlayer())
3255 return 0; 3255 return 0;
3256 return m_player->videoDecodedByteCount(); 3256 return webMediaPlayer()->videoDecodedByteCount();
3257 } 3257 }
3258 3258
3259 bool HTMLMediaElement::isURLAttribute(const Attribute& attribute) const 3259 bool HTMLMediaElement::isURLAttribute(const Attribute& attribute) const
3260 { 3260 {
3261 return attribute.name() == srcAttr || HTMLElement::isURLAttribute(attribute) ; 3261 return attribute.name() == srcAttr || HTMLElement::isURLAttribute(attribute) ;
3262 } 3262 }
3263 3263
3264 void HTMLMediaElement::setShouldDelayLoadEvent(bool shouldDelay) 3264 void HTMLMediaElement::setShouldDelayLoadEvent(bool shouldDelay)
3265 { 3265 {
3266 if (m_shouldDelayLoadEvent == shouldDelay) 3266 if (m_shouldDelayLoadEvent == shouldDelay)
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
3611 { 3611 {
3612 visitor->trace(m_currentSourceNode); 3612 visitor->trace(m_currentSourceNode);
3613 visitor->trace(m_nextChildNodeToConsider); 3613 visitor->trace(m_nextChildNodeToConsider);
3614 visitor->trace(m_textTracks); 3614 visitor->trace(m_textTracks);
3615 visitor->trace(m_textTracksWhenResourceSelectionBegan); 3615 visitor->trace(m_textTracksWhenResourceSelectionBegan);
3616 WillBeHeapSupplementable<HTMLMediaElement>::trace(visitor); 3616 WillBeHeapSupplementable<HTMLMediaElement>::trace(visitor);
3617 HTMLElement::trace(visitor); 3617 HTMLElement::trace(visitor);
3618 } 3618 }
3619 3619
3620 } 3620 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698