| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 | 296 |
| 297 using RecordMetricsBehavior = HTMLMediaElement::RecordMetricsBehavior; | 297 using RecordMetricsBehavior = HTMLMediaElement::RecordMetricsBehavior; |
| 298 | 298 |
| 299 double currentTime() const override { return m_element->currentTime(); } | 299 double currentTime() const override { return m_element->currentTime(); } |
| 300 double duration() const override { return m_element->duration(); } | 300 double duration() const override { return m_element->duration(); } |
| 301 bool paused() const override { return m_element->paused(); } | 301 bool paused() const override { return m_element->paused(); } |
| 302 bool ended() const override { return m_element->ended(); } | 302 bool ended() const override { return m_element->ended(); } |
| 303 bool muted() const override { return m_element->muted(); } | 303 bool muted() const override { return m_element->muted(); } |
| 304 void setMuted(bool muted) override { m_element->setMuted(muted); } | 304 void setMuted(bool muted) override { m_element->setMuted(muted); } |
| 305 void playInternal() override { m_element->playInternal(); } | 305 void playInternal() override { m_element->playInternal(); } |
| 306 void pauseInternal() override { m_element->pauseInternal(); } |
| 306 bool isLockedPendingUserGesture() const override { return m_element->isLocke
dPendingUserGesture(); } | 307 bool isLockedPendingUserGesture() const override { return m_element->isLocke
dPendingUserGesture(); } |
| 307 void unlockUserGesture() override { m_element->unlockUserGesture(); } | 308 void unlockUserGesture() override { m_element->unlockUserGesture(); } |
| 308 void recordAutoplayMetric(AutoplayMetrics metric) override { m_element->reco
rdAutoplayMetric(metric); } | 309 void recordAutoplayMetric(AutoplayMetrics metric) override { m_element->reco
rdAutoplayMetric(metric); } |
| 309 bool shouldAutoplay() override | 310 bool shouldAutoplay() override |
| 310 { | 311 { |
| 311 return m_element->shouldAutoplay(RecordMetricsBehavior::DoNotRecord); | 312 return m_element->shouldAutoplay(RecordMetricsBehavior::DoNotRecord); |
| 312 } | 313 } |
| 313 bool isHTMLVideoElement() const override { return m_element->isHTMLVideoElem
ent(); } | 314 bool isHTMLVideoElement() const override { return m_element->isHTMLVideoElem
ent(); } |
| 314 bool isHTMLAudioElement() const override { return m_element->isHTMLAudioElem
ent(); } | 315 bool isHTMLAudioElement() const override { return m_element->isHTMLAudioElem
ent(); } |
| 315 | 316 |
| (...skipping 1929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2245 } | 2246 } |
| 2246 | 2247 |
| 2247 void HTMLMediaElement::setMuted(bool muted) | 2248 void HTMLMediaElement::setMuted(bool muted) |
| 2248 { | 2249 { |
| 2249 WTF_LOG(Media, "HTMLMediaElement::setMuted(%p, %s)", this, boolString(muted)
); | 2250 WTF_LOG(Media, "HTMLMediaElement::setMuted(%p, %s)", this, boolString(muted)
); |
| 2250 | 2251 |
| 2251 if (m_muted == muted) | 2252 if (m_muted == muted) |
| 2252 return; | 2253 return; |
| 2253 | 2254 |
| 2254 m_muted = muted; | 2255 m_muted = muted; |
| 2256 m_autoplayHelper->mutedChanged(); |
| 2255 | 2257 |
| 2256 updateVolume(); | 2258 updateVolume(); |
| 2257 | 2259 |
| 2258 if (muted) | 2260 if (muted) |
| 2259 Platform::current()->recordAction(UserMetricsAction("Media_Playback_Mute
_On")); | 2261 Platform::current()->recordAction(UserMetricsAction("Media_Playback_Mute
_On")); |
| 2260 else | 2262 else |
| 2261 Platform::current()->recordAction(UserMetricsAction("Media_Playback_Mute
_Off")); | 2263 Platform::current()->recordAction(UserMetricsAction("Media_Playback_Mute
_Off")); |
| 2262 | 2264 |
| 2263 scheduleEvent(EventTypeNames::volumechange); | 2265 scheduleEvent(EventTypeNames::volumechange); |
| 2264 } | 2266 } |
| (...skipping 1618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3883 | 3885 |
| 3884 IntRect HTMLMediaElement::AutoplayHelperClientImpl::absoluteBoundingBoxRect() co
nst | 3886 IntRect HTMLMediaElement::AutoplayHelperClientImpl::absoluteBoundingBoxRect() co
nst |
| 3885 { | 3887 { |
| 3886 IntRect result; | 3888 IntRect result; |
| 3887 if (LayoutObject* object = m_element->layoutObject()) | 3889 if (LayoutObject* object = m_element->layoutObject()) |
| 3888 result = object->absoluteBoundingBoxRect(); | 3890 result = object->absoluteBoundingBoxRect(); |
| 3889 return result; | 3891 return result; |
| 3890 } | 3892 } |
| 3891 | 3893 |
| 3892 } // namespace blink | 3894 } // namespace blink |
| OLD | NEW |