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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
243 // Both Node (via HTMLElement) and ActiveDOMObject define this method, which | 243 // Both Node (via HTMLElement) and ActiveDOMObject define this method, which |
244 // causes an ambiguity error at compile time. This class's constructor | 244 // causes an ambiguity error at compile time. This class's constructor |
245 // ensures that both implementations return document, so return the result | 245 // ensures that both implementations return document, so return the result |
246 // of one of them here. | 246 // of one of them here. |
247 virtual ExecutionContext* executionContext() const OVERRIDE FINAL { return H TMLElement::executionContext(); } | 247 virtual ExecutionContext* executionContext() const OVERRIDE FINAL { return H TMLElement::executionContext(); } |
248 | 248 |
249 bool hasSingleSecurityOrigin() const { return !m_player || m_player->hasSing leSecurityOrigin(); } | 249 bool hasSingleSecurityOrigin() const { return !m_player || m_player->hasSing leSecurityOrigin(); } |
250 | 250 |
251 bool isFullscreen() const; | 251 bool isFullscreen() const; |
252 virtual void enterFullscreen() OVERRIDE FINAL; | 252 virtual void enterFullscreen() OVERRIDE FINAL; |
253 void exitFullscreen(); | |
254 | 253 |
255 virtual bool hasClosedCaptions() const OVERRIDE FINAL; | 254 virtual bool hasClosedCaptions() const OVERRIDE FINAL; |
256 virtual bool closedCaptionsVisible() const OVERRIDE FINAL; | 255 virtual bool closedCaptionsVisible() const OVERRIDE FINAL; |
257 virtual void setClosedCaptionsVisible(bool) OVERRIDE FINAL; | 256 virtual void setClosedCaptionsVisible(bool) OVERRIDE FINAL; |
258 | 257 |
259 MediaControls* mediaControls() const; | 258 MediaControls* mediaControls() const; |
260 | 259 |
261 void sourceWasRemoved(HTMLSourceElement*); | 260 void sourceWasRemoved(HTMLSourceElement*); |
262 void sourceWasAdded(HTMLSourceElement*); | 261 void sourceWasAdded(HTMLSourceElement*); |
263 | 262 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
295 DisplayMode displayMode() const { return m_displayMode; } | 294 DisplayMode displayMode() const { return m_displayMode; } |
296 virtual void setDisplayMode(DisplayMode mode) { m_displayMode = mode; } | 295 virtual void setDisplayMode(DisplayMode mode) { m_displayMode = mode; } |
297 | 296 |
298 virtual bool isMediaElement() const OVERRIDE FINAL { return true; } | 297 virtual bool isMediaElement() const OVERRIDE FINAL { return true; } |
299 | 298 |
300 void setControllerInternal(PassRefPtr<MediaController>); | 299 void setControllerInternal(PassRefPtr<MediaController>); |
301 | 300 |
302 // Restrictions to change default behaviors. | 301 // Restrictions to change default behaviors. |
303 enum BehaviorRestrictionFlags { | 302 enum BehaviorRestrictionFlags { |
304 NoRestrictions = 0, | 303 NoRestrictions = 0, |
305 RequireUserGestureForPlayRestriction = 1 << 0, | 304 RequireUserGestureForPlayRestriction = 1 << 0, |
philipj_slow
2014/02/25 06:02:15
Yes, this is a bit silly now. Here's an unsubmitte
| |
306 RequireUserGestureForFullscreenRestriction = 1 << 1, | |
307 }; | 305 }; |
308 typedef unsigned BehaviorRestrictions; | 306 typedef unsigned BehaviorRestrictions; |
309 | 307 |
310 bool userGestureRequiredForPlay() const { return m_restrictions & RequireUse rGestureForPlayRestriction; } | 308 bool userGestureRequiredForPlay() const { return m_restrictions & RequireUse rGestureForPlayRestriction; } |
311 bool userGestureRequiredForFullscreen() const { return m_restrictions & Requ ireUserGestureForFullscreenRestriction; } | |
312 | 309 |
313 void addBehaviorRestriction(BehaviorRestrictions restriction) { m_restrictio ns |= restriction; } | 310 void addBehaviorRestriction(BehaviorRestrictions restriction) { m_restrictio ns |= restriction; } |
314 void removeBehaviorRestriction(BehaviorRestrictions restriction) { m_restric tions &= ~restriction; } | 311 void removeBehaviorRestriction(BehaviorRestrictions restriction) { m_restric tions &= ~restriction; } |
315 | 312 |
316 bool ignoreTrackDisplayUpdateRequests() const { return m_ignoreTrackDisplayU pdate > 0; } | 313 bool ignoreTrackDisplayUpdateRequests() const { return m_ignoreTrackDisplayU pdate > 0; } |
317 void beginIgnoringTrackDisplayUpdateRequests(); | 314 void beginIgnoringTrackDisplayUpdateRequests(); |
318 void endIgnoringTrackDisplayUpdateRequests(); | 315 void endIgnoringTrackDisplayUpdateRequests(); |
319 | 316 |
320 private: | 317 private: |
321 void createMediaPlayer(); | 318 void createMediaPlayer(); |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
595 inline bool isHTMLMediaElement(const Node& node) | 592 inline bool isHTMLMediaElement(const Node& node) |
596 { | 593 { |
597 return node.isElementNode() && toElement(node).isMediaElement(); | 594 return node.isElementNode() && toElement(node).isMediaElement(); |
598 } | 595 } |
599 | 596 |
600 DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); | 597 DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); |
601 | 598 |
602 } //namespace | 599 } //namespace |
603 | 600 |
604 #endif | 601 #endif |
OLD | NEW |