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