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

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

Issue 2049003002: Wrap GCed raw pointer parameters of WTF::bind with Persistent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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 1632 matching lines...) Expand 10 before | Expand all | Expand 10 after
1643 // Check for autoplay, and record metrics about it if needed. 1643 // Check for autoplay, and record metrics about it if needed.
1644 if (shouldAutoplay(RecordMetricsBehavior::DoRecord)) { 1644 if (shouldAutoplay(RecordMetricsBehavior::DoRecord)) {
1645 recordAutoplaySourceMetric(AutoplaySourceAttribute); 1645 recordAutoplaySourceMetric(AutoplaySourceAttribute);
1646 1646
1647 // If the autoplay experiment says that it's okay to play now, 1647 // If the autoplay experiment says that it's okay to play now,
1648 // then don't require a user gesture. 1648 // then don't require a user gesture.
1649 m_autoplayHelper->becameReadyToPlay(); 1649 m_autoplayHelper->becameReadyToPlay();
1650 1650
1651 if (!isGestureNeededForPlayback()) { 1651 if (!isGestureNeededForPlayback()) {
1652 if (isHTMLVideoElement() && muted() && RuntimeEnabledFeatures::a utoplayMutedVideosEnabled()) { 1652 if (isHTMLVideoElement() && muted() && RuntimeEnabledFeatures::a utoplayMutedVideosEnabled()) {
1653 m_autoplayVisibilityObserver = new ElementVisibilityObserver (this, WTF::bind(&HTMLMediaElement::onVisibilityChangedForAutoplay, this)); 1653 m_autoplayVisibilityObserver = new ElementVisibilityObserver (this, WTF::bind(&HTMLMediaElement::onVisibilityChangedForAutoplay, wrapPersiste nt(this)));
1654 m_autoplayVisibilityObserver->start(); 1654 m_autoplayVisibilityObserver->start();
1655 } else { 1655 } else {
1656 m_paused = false; 1656 m_paused = false;
1657 invalidateCachedTime(); 1657 invalidateCachedTime();
1658 scheduleEvent(EventTypeNames::play); 1658 scheduleEvent(EventTypeNames::play);
1659 scheduleNotifyPlaying(); 1659 scheduleNotifyPlaying();
1660 m_autoplaying = false; 1660 m_autoplaying = false;
1661 } 1661 }
1662 } 1662 }
1663 } 1663 }
(...skipping 2351 matching lines...) Expand 10 before | Expand all | Expand 10 after
4015 4015
4016 IntRect HTMLMediaElement::AutoplayHelperClientImpl::absoluteBoundingBoxRect() co nst 4016 IntRect HTMLMediaElement::AutoplayHelperClientImpl::absoluteBoundingBoxRect() co nst
4017 { 4017 {
4018 IntRect result; 4018 IntRect result;
4019 if (LayoutObject* object = m_element->layoutObject()) 4019 if (LayoutObject* object = m_element->layoutObject())
4020 result = object->absoluteBoundingBoxRect(); 4020 result = object->absoluteBoundingBoxRect();
4021 return result; 4021 return result;
4022 } 4022 }
4023 4023
4024 } // namespace blink 4024 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLInputElement.cpp ('k') | third_party/WebKit/Source/core/html/HTMLSelectElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698