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

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

Issue 11415159: Merge 135906 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1271/
Patch Set: Created 8 years 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
« no previous file with comments | « LayoutTests/http/tests/media/media-source/video-media-source-state-changes-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserv ed.
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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 m_textTracks->clearOwner(); 296 m_textTracks->clearOwner();
297 if (m_textTracks) { 297 if (m_textTracks) {
298 for (unsigned i = 0; i < m_textTracks->length(); ++i) 298 for (unsigned i = 0; i < m_textTracks->length(); ++i)
299 m_textTracks->item(i)->clearClient(); 299 m_textTracks->item(i)->clearClient();
300 } 300 }
301 #endif 301 #endif
302 302
303 if (m_mediaController) 303 if (m_mediaController)
304 m_mediaController->removeMediaElement(this); 304 m_mediaController->removeMediaElement(this);
305 305
306 #if ENABLE(MEDIA_SOURCE)
307 setSourceState(MediaSource::closedKeyword());
308 #endif
309
306 removeElementFromDocumentMap(this, document()); 310 removeElementFromDocumentMap(this, document());
307 } 311 }
308 312
309 void HTMLMediaElement::didMoveToNewDocument(Document* oldDocument) 313 void HTMLMediaElement::didMoveToNewDocument(Document* oldDocument)
310 { 314 {
311 if (m_isWaitingUntilMediaCanStart) { 315 if (m_isWaitingUntilMediaCanStart) {
312 if (oldDocument) 316 if (oldDocument)
313 oldDocument->removeMediaCanStartListener(this); 317 oldDocument->removeMediaCanStartListener(this);
314 document()->addMediaCanStartListener(this); 318 document()->addMediaCanStartListener(this);
315 } 319 }
(...skipping 3293 matching lines...) Expand 10 before | Expand all | Expand 10 after
3609 void HTMLMediaElement::userCancelledLoad() 3613 void HTMLMediaElement::userCancelledLoad()
3610 { 3614 {
3611 LOG(Media, "HTMLMediaElement::userCancelledLoad"); 3615 LOG(Media, "HTMLMediaElement::userCancelledLoad");
3612 3616
3613 if (m_networkState == NETWORK_EMPTY || m_completelyLoaded) 3617 if (m_networkState == NETWORK_EMPTY || m_completelyLoaded)
3614 return; 3618 return;
3615 3619
3616 // If the media data fetching process is aborted by the user: 3620 // If the media data fetching process is aborted by the user:
3617 3621
3618 // 1 - The user agent should cancel the fetching process. 3622 // 1 - The user agent should cancel the fetching process.
3623 #if ENABLE(MEDIA_SOURCE)
3624 setSourceState(MediaSource::closedKeyword());
3625 #endif
3626
3619 #if !ENABLE(PLUGIN_PROXY_FOR_VIDEO) 3627 #if !ENABLE(PLUGIN_PROXY_FOR_VIDEO)
3620 m_player.clear(); 3628 m_player.clear();
3621 #endif 3629 #endif
3622 stopPeriodicTimers(); 3630 stopPeriodicTimers();
3623 m_loadTimer.stop(); 3631 m_loadTimer.stop();
3624 m_loadState = WaitingForSource; 3632 m_loadState = WaitingForSource;
3625 m_pendingLoadFlags = 0; 3633 m_pendingLoadFlags = 0;
3626 3634
3627 // 2 - Set the error attribute to a new MediaError object whose code attribu te is set to MEDIA_ERR_ABORTED. 3635 // 2 - Set the error attribute to a new MediaError object whose code attribu te is set to MEDIA_ERR_ABORTED.
3628 m_error = MediaError::create(MediaError::MEDIA_ERR_ABORTED); 3636 m_error = MediaError::create(MediaError::MEDIA_ERR_ABORTED);
(...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after
4493 return mediaPlayerOwningDocument()->view()->windowClipRect(); 4501 return mediaPlayerOwningDocument()->view()->windowClipRect();
4494 } 4502 }
4495 4503
4496 void HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture() 4504 void HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture()
4497 { 4505 {
4498 m_restrictions = NoRestrictions; 4506 m_restrictions = NoRestrictions;
4499 } 4507 }
4500 4508
4501 } 4509 }
4502 #endif 4510 #endif
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/media/media-source/video-media-source-state-changes-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698