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

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

Issue 2629593004: Disambiguate LifecycleObserver::contextDestroyed (Closed)
Patch Set: temp Created 3 years, 11 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/html/AutoplayUmaHelper.h" 5 #include "core/html/AutoplayUmaHelper.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/dom/ElementVisibilityObserver.h" 8 #include "core/dom/ElementVisibilityObserver.h"
9 #include "core/events/Event.h" 9 #include "core/events/Event.h"
10 #include "core/frame/Settings.h" 10 #include "core/frame/Settings.h"
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 maybeStartRecordingMutedVideoOffscreenDuration(); 229 maybeStartRecordingMutedVideoOffscreenDuration();
230 230
231 m_element->removeEventListener(EventTypeNames::playing, this, false); 231 m_element->removeEventListener(EventTypeNames::playing, this, false);
232 } 232 }
233 233
234 void AutoplayUmaHelper::handlePauseEvent() { 234 void AutoplayUmaHelper::handlePauseEvent() {
235 maybeStopRecordingMutedVideoOffscreenDuration(); 235 maybeStopRecordingMutedVideoOffscreenDuration();
236 maybeRecordUserPausedAutoplayingCrossOriginVideo(); 236 maybeRecordUserPausedAutoplayingCrossOriginVideo();
237 } 237 }
238 238
239 void AutoplayUmaHelper::contextDestroyed() { 239 void AutoplayUmaHelper::contextDestroyed(ExecutionContext*) {
240 handleContextDestroyed(); 240 handleContextDestroyed();
241 } 241 }
242 242
243 void AutoplayUmaHelper::handleContextDestroyed() { 243 void AutoplayUmaHelper::handleContextDestroyed() {
244 maybeStopRecordingMutedVideoPlayMethodBecomeVisible(false); 244 maybeStopRecordingMutedVideoPlayMethodBecomeVisible(false);
245 maybeStopRecordingMutedVideoOffscreenDuration(); 245 maybeStopRecordingMutedVideoOffscreenDuration();
246 } 246 }
247 247
248 void AutoplayUmaHelper::maybeStartRecordingMutedVideoPlayMethodBecomeVisible() { 248 void AutoplayUmaHelper::maybeStartRecordingMutedVideoPlayMethodBecomeVisible() {
249 if (m_source != AutoplaySource::Method || !m_element->isHTMLVideoElement() || 249 if (m_source != AutoplaySource::Method || !m_element->isHTMLVideoElement() ||
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 361
362 DEFINE_TRACE(AutoplayUmaHelper) { 362 DEFINE_TRACE(AutoplayUmaHelper) {
363 EventListener::trace(visitor); 363 EventListener::trace(visitor);
364 ContextLifecycleObserver::trace(visitor); 364 ContextLifecycleObserver::trace(visitor);
365 visitor->trace(m_element); 365 visitor->trace(m_element);
366 visitor->trace(m_mutedVideoPlayMethodVisibilityObserver); 366 visitor->trace(m_mutedVideoPlayMethodVisibilityObserver);
367 visitor->trace(m_mutedVideoOffscreenDurationVisibilityObserver); 367 visitor->trace(m_mutedVideoOffscreenDurationVisibilityObserver);
368 } 368 }
369 369
370 } // namespace blink 370 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/AutoplayUmaHelper.h ('k') | third_party/WebKit/Source/core/html/HTMLCanvasElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698