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

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

Issue 1998553002: media: Replace wtf/Assertions.h macros in favor of base/logging.h macros (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 7 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLTrackElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/AutoplayExperimentHelper.h" 5 #include "core/html/AutoplayExperimentHelper.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/frame/Settings.h" 8 #include "core/frame/Settings.h"
9 #include "core/html/HTMLMediaElement.h" 9 #include "core/html/HTMLMediaElement.h"
10 #include "core/layout/LayoutBox.h" 10 #include "core/layout/LayoutBox.h"
(...skipping 21 matching lines...) Expand all
32 , m_autoplayMediaEncountered(false) 32 , m_autoplayMediaEncountered(false)
33 , m_playbackStartedMetricRecorded(false) 33 , m_playbackStartedMetricRecorded(false)
34 , m_waitingForAutoplayPlaybackStop(false) 34 , m_waitingForAutoplayPlaybackStop(false)
35 , m_recordedElement(false) 35 , m_recordedElement(false)
36 , m_lastLocationUpdateTime(-std::numeric_limits<double>::infinity()) 36 , m_lastLocationUpdateTime(-std::numeric_limits<double>::infinity())
37 , m_viewportTimer(this, &AutoplayExperimentHelper::viewportTimerFired) 37 , m_viewportTimer(this, &AutoplayExperimentHelper::viewportTimerFired)
38 , m_autoplayDeferredMetric(GesturelessPlaybackNotOverridden) 38 , m_autoplayDeferredMetric(GesturelessPlaybackNotOverridden)
39 { 39 {
40 m_mode = fromString(this->client().autoplayExperimentMode()); 40 m_mode = fromString(this->client().autoplayExperimentMode());
41 41
42 if (isExperimentEnabled()) { 42 DVLOG_IF(3, isExperimentEnabled()) << "autoplay experiment set to " << m_mod e;
43 WTF_LOG(Media, "HTMLMediaElement: autoplay experiment set to %d",
44 m_mode);
45 }
46 } 43 }
47 44
48 AutoplayExperimentHelper::~AutoplayExperimentHelper() 45 AutoplayExperimentHelper::~AutoplayExperimentHelper()
49 { 46 {
50 } 47 }
51 48
52 void AutoplayExperimentHelper::dispose() 49 void AutoplayExperimentHelper::dispose()
53 { 50 {
54 // Do any cleanup that requires the client. 51 // Do any cleanup that requires the client.
55 unregisterForPositionUpdatesIfNeeded(); 52 unregisterForPositionUpdatesIfNeeded();
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 { 546 {
550 return client().isHTMLVideoElement() && (enabled(IfViewport) || enabled(IfPa rtialViewport)); 547 return client().isHTMLVideoElement() && (enabled(IfViewport) || enabled(IfPa rtialViewport));
551 } 548 }
552 549
553 bool AutoplayExperimentHelper::isExperimentEnabled() 550 bool AutoplayExperimentHelper::isExperimentEnabled()
554 { 551 {
555 return m_mode != Mode::ExperimentOff; 552 return m_mode != Mode::ExperimentOff;
556 } 553 }
557 554
558 } // namespace blink 555 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLTrackElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698