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

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

Issue 1482393003: Clear m_autoplaying when starting auto playback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cl feedback Created 5 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 | « third_party/WebKit/LayoutTests/media/autoplay-clears-autoplaying-flag.html ('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, 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 1538 matching lines...) Expand 10 before | Expand all | Expand 10 after
1549 if (shouldAutoplay(RecordMetricsBehavior::DoRecord)) { 1549 if (shouldAutoplay(RecordMetricsBehavior::DoRecord)) {
1550 // If the autoplay experiment says that it's okay to play now, 1550 // If the autoplay experiment says that it's okay to play now,
1551 // then don't require a user gesture. 1551 // then don't require a user gesture.
1552 m_autoplayHelper.becameReadyToPlay(); 1552 m_autoplayHelper.becameReadyToPlay();
1553 1553
1554 if (!m_userGestureRequiredForPlay) { 1554 if (!m_userGestureRequiredForPlay) {
1555 m_paused = false; 1555 m_paused = false;
1556 invalidateCachedTime(); 1556 invalidateCachedTime();
1557 scheduleEvent(EventTypeNames::play); 1557 scheduleEvent(EventTypeNames::play);
1558 scheduleEvent(EventTypeNames::playing); 1558 scheduleEvent(EventTypeNames::playing);
1559 m_autoplaying = false;
1559 } 1560 }
1560 } 1561 }
1561 1562
1562 scheduleEvent(EventTypeNames::canplaythrough); 1563 scheduleEvent(EventTypeNames::canplaythrough);
1563 1564
1564 shouldUpdateDisplayState = true; 1565 shouldUpdateDisplayState = true;
1565 } 1566 }
1566 1567
1567 if (shouldUpdateDisplayState) { 1568 if (shouldUpdateDisplayState) {
1568 updateDisplayState(); 1569 updateDisplayState();
(...skipping 2103 matching lines...) Expand 10 before | Expand all | Expand 10 after
3672 visitor->trace(m_client); 3673 visitor->trace(m_client);
3673 } 3674 }
3674 3675
3675 DEFINE_TRACE(HTMLMediaElement::AudioSourceProviderImpl) 3676 DEFINE_TRACE(HTMLMediaElement::AudioSourceProviderImpl)
3676 { 3677 {
3677 visitor->trace(m_client); 3678 visitor->trace(m_client);
3678 } 3679 }
3679 #endif 3680 #endif
3680 3681
3681 } 3682 }
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/media/autoplay-clears-autoplaying-flag.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698