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

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

Issue 2554113002: Deprecate UnthrottledThreadTimer. (Closed)
Patch Set: Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 bool HTMLMediaElement::mediaTracksEnabledInternally() { 336 bool HTMLMediaElement::mediaTracksEnabledInternally() {
337 return RuntimeEnabledFeatures::audioVideoTracksEnabled() || 337 return RuntimeEnabledFeatures::audioVideoTracksEnabled() ||
338 RuntimeEnabledFeatures::backgroundVideoTrackOptimizationEnabled(); 338 RuntimeEnabledFeatures::backgroundVideoTrackOptimizationEnabled();
339 } 339 }
340 340
341 HTMLMediaElement::HTMLMediaElement(const QualifiedName& tagName, 341 HTMLMediaElement::HTMLMediaElement(const QualifiedName& tagName,
342 Document& document) 342 Document& document)
343 : HTMLElement(tagName, document), 343 : HTMLElement(tagName, document),
344 ActiveScriptWrappable(this), 344 ActiveScriptWrappable(this),
345 ActiveDOMObject(&document), 345 ActiveDOMObject(&document),
346 m_loadTimer(this, &HTMLMediaElement::loadTimerFired), 346 m_loadTimer(TaskRunnerHelper::get(TaskType::Unthrottled, &document),
347 m_progressEventTimer(this, &HTMLMediaElement::progressEventTimerFired), 347 this,
348 m_playbackProgressTimer(this, 348 &HTMLMediaElement::loadTimerFired),
349 &HTMLMediaElement::playbackProgressTimerFired), 349 m_progressEventTimer(
350 m_audioTracksTimer(this, &HTMLMediaElement::audioTracksTimerFired), 350 TaskRunnerHelper::get(TaskType::Unthrottled, &document),
351 this,
352 &HTMLMediaElement::progressEventTimerFired),
353 m_playbackProgressTimer(
354 TaskRunnerHelper::get(TaskType::Unthrottled, &document),
355 this,
356 &HTMLMediaElement::playbackProgressTimerFired),
357 m_audioTracksTimer(
358 TaskRunnerHelper::get(TaskType::Unthrottled, &document),
359 this,
360 &HTMLMediaElement::audioTracksTimerFired),
351 m_viewportFillDebouncerTimer( 361 m_viewportFillDebouncerTimer(
362 TaskRunnerHelper::get(TaskType::Unthrottled, &document),
352 this, 363 this,
353 &HTMLMediaElement::viewportFillDebouncerTimerFired), 364 &HTMLMediaElement::viewportFillDebouncerTimerFired),
354 m_playedTimeRanges(), 365 m_playedTimeRanges(),
355 m_asyncEventQueue(GenericEventQueue::create(this)), 366 m_asyncEventQueue(GenericEventQueue::create(this)),
356 m_playbackRate(1.0f), 367 m_playbackRate(1.0f),
357 m_defaultPlaybackRate(1.0f), 368 m_defaultPlaybackRate(1.0f),
358 m_networkState(kNetworkEmpty), 369 m_networkState(kNetworkEmpty),
359 m_readyState(kHaveNothing), 370 m_readyState(kHaveNothing),
360 m_readyStateMaximum(kHaveNothing), 371 m_readyStateMaximum(kHaveNothing),
361 m_volume(1.0f), 372 m_volume(1.0f),
(...skipping 3699 matching lines...) Expand 10 before | Expand all | Expand 10 after
4061 kMostlyFillViewportBecomeStableSeconds, BLINK_FROM_HERE); 4072 kMostlyFillViewportBecomeStableSeconds, BLINK_FROM_HERE);
4062 } 4073 }
4063 4074
4064 void HTMLMediaElement::viewportFillDebouncerTimerFired(TimerBase*) { 4075 void HTMLMediaElement::viewportFillDebouncerTimerFired(TimerBase*) {
4065 m_mostlyFillingViewport = true; 4076 m_mostlyFillingViewport = true;
4066 if (m_webMediaPlayer) 4077 if (m_webMediaPlayer)
4067 m_webMediaPlayer->becameDominantVisibleContent(m_mostlyFillingViewport); 4078 m_webMediaPlayer->becameDominantVisibleContent(m_mostlyFillingViewport);
4068 } 4079 }
4069 4080
4070 } // namespace blink 4081 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698