| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef AutoplayExperimentHelper_h | 5 #ifndef AutoplayExperimentHelper_h |
| 6 #define AutoplayExperimentHelper_h | 6 #define AutoplayExperimentHelper_h |
| 7 | 7 |
| 8 #include "core/page/Page.h" | 8 #include "core/page/Page.h" |
| 9 #include "platform/Timer.h" | 9 #include "platform/Timer.h" |
| 10 #include "platform/geometry/IntRect.h" | 10 #include "platform/geometry/IntRect.h" |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 | 147 |
| 148 HTMLMediaElement& element() const; | 148 HTMLMediaElement& element() const; |
| 149 | 149 |
| 150 inline bool enabled(Mode mode) const | 150 inline bool enabled(Mode mode) const |
| 151 { | 151 { |
| 152 return ((int)m_mode) & ((int)mode); | 152 return ((int)m_mode) & ((int)mode); |
| 153 } | 153 } |
| 154 | 154 |
| 155 Mode fromString(const String& mode); | 155 Mode fromString(const String& mode); |
| 156 | 156 |
| 157 RawPtrWillBeMember<HTMLMediaElement> m_element; | 157 Member<HTMLMediaElement> m_element; |
| 158 | 158 |
| 159 Mode m_mode; | 159 Mode m_mode; |
| 160 | 160 |
| 161 // Autoplay experiment state. | 161 // Autoplay experiment state. |
| 162 // True if we've received a play() without a pause(). | 162 // True if we've received a play() without a pause(). |
| 163 bool m_playPending : 1; | 163 bool m_playPending : 1; |
| 164 | 164 |
| 165 // Are we registered with the view for position updates? | 165 // Are we registered with the view for position updates? |
| 166 bool m_registeredWithLayoutObject : 1; | 166 bool m_registeredWithLayoutObject : 1; |
| 167 | 167 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 182 const AutoplayExperimentHelper::Mode& b) | 182 const AutoplayExperimentHelper::Mode& b) |
| 183 { | 183 { |
| 184 a = static_cast<AutoplayExperimentHelper::Mode>(static_cast<int>(a) | static
_cast<int>(b)); | 184 a = static_cast<AutoplayExperimentHelper::Mode>(static_cast<int>(a) | static
_cast<int>(b)); |
| 185 return a; | 185 return a; |
| 186 } | 186 } |
| 187 | 187 |
| 188 | 188 |
| 189 } // namespace blink | 189 } // namespace blink |
| 190 | 190 |
| 191 #endif // AutoplayExperimentHelper_h | 191 #endif // AutoplayExperimentHelper_h |
| OLD | NEW |