| OLD | NEW |
| 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" |
| 11 #include "core/layout/LayoutObject.h" | 11 #include "core/layout/LayoutObject.h" |
| 12 #include "core/layout/LayoutVideo.h" | 12 #include "core/layout/LayoutVideo.h" |
| 13 #include "core/layout/LayoutView.h" | |
| 14 #include "core/page/Page.h" | 13 #include "core/page/Page.h" |
| 15 #include "platform/Logging.h" | 14 #include "platform/Logging.h" |
| 16 #include "platform/UserGestureIndicator.h" | 15 #include "platform/UserGestureIndicator.h" |
| 17 #include "platform/geometry/IntRect.h" | 16 #include "platform/geometry/IntRect.h" |
| 18 | 17 |
| 19 namespace blink { | 18 namespace blink { |
| 20 | 19 |
| 21 using namespace HTMLNames; | 20 using namespace HTMLNames; |
| 22 | 21 |
| 23 // Seconds to wait after a video has stopped moving before playing it. | 22 // Seconds to wait after a video has stopped moving before playing it. |
| (...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 { | 534 { |
| 536 return client().isHTMLVideoElement() && (enabled(IfViewport) || enabled(IfPa
rtialViewport)); | 535 return client().isHTMLVideoElement() && (enabled(IfViewport) || enabled(IfPa
rtialViewport)); |
| 537 } | 536 } |
| 538 | 537 |
| 539 bool AutoplayExperimentHelper::isExperimentEnabled() | 538 bool AutoplayExperimentHelper::isExperimentEnabled() |
| 540 { | 539 { |
| 541 return m_mode != Mode::ExperimentOff; | 540 return m_mode != Mode::ExperimentOff; |
| 542 } | 541 } |
| 543 | 542 |
| 544 } // namespace blink | 543 } // namespace blink |
| OLD | NEW |