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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 AudioSourceProvider* audioSourceProvider(); | 272 AudioSourceProvider* audioSourceProvider(); |
273 #endif | 273 #endif |
274 | 274 |
275 enum InvalidURLAction { DoNothing, Complain }; | 275 enum InvalidURLAction { DoNothing, Complain }; |
276 bool isSafeToLoadURL(const KURL&, InvalidURLAction); | 276 bool isSafeToLoadURL(const KURL&, InvalidURLAction); |
277 | 277 |
278 const String& mediaGroup() const; | 278 const String& mediaGroup() const; |
279 void setMediaGroup(const String&); | 279 void setMediaGroup(const String&); |
280 | 280 |
281 MediaController* controller() const; | 281 MediaController* controller() const; |
282 void setController(PassRefPtr<MediaController>); | 282 void setController(PassRefPtr<MediaController>); // Resets the MediaGroup an
d sets the MediaController. |
283 | 283 |
284 protected: | 284 protected: |
285 HTMLMediaElement(const QualifiedName&, Document&, bool); | 285 HTMLMediaElement(const QualifiedName&, Document&, bool); |
286 virtual ~HTMLMediaElement(); | 286 virtual ~HTMLMediaElement(); |
287 | 287 |
288 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; | 288 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; |
289 virtual void finishParsingChildren() OVERRIDE; | 289 virtual void finishParsingChildren() OVERRIDE; |
290 virtual bool isURLAttribute(const Attribute&) const OVERRIDE; | 290 virtual bool isURLAttribute(const Attribute&) const OVERRIDE; |
291 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE; | 291 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE; |
292 | 292 |
293 virtual void didMoveToNewDocument(Document& oldDocument) OVERRIDE; | 293 virtual void didMoveToNewDocument(Document& oldDocument) OVERRIDE; |
294 | 294 |
295 enum DisplayMode { Unknown, None, Poster, PosterWaitingForVideo, Video }; | 295 enum DisplayMode { Unknown, None, Poster, PosterWaitingForVideo, Video }; |
296 DisplayMode displayMode() const { return m_displayMode; } | 296 DisplayMode displayMode() const { return m_displayMode; } |
297 virtual void setDisplayMode(DisplayMode mode) { m_displayMode = mode; } | 297 virtual void setDisplayMode(DisplayMode mode) { m_displayMode = mode; } |
298 | 298 |
299 virtual bool isMediaElement() const OVERRIDE { return true; } | 299 virtual bool isMediaElement() const OVERRIDE { return true; } |
300 | 300 |
| 301 void setControllerInternal(PassRefPtr<MediaController>); |
| 302 |
301 // Restrictions to change default behaviors. | 303 // Restrictions to change default behaviors. |
302 enum BehaviorRestrictionFlags { | 304 enum BehaviorRestrictionFlags { |
303 NoRestrictions = 0, | 305 NoRestrictions = 0, |
304 RequireUserGestureForLoadRestriction = 1 << 0, | 306 RequireUserGestureForLoadRestriction = 1 << 0, |
305 RequireUserGestureForRateChangeRestriction = 1 << 1, | 307 RequireUserGestureForRateChangeRestriction = 1 << 1, |
306 RequireUserGestureForFullscreenRestriction = 1 << 2, | 308 RequireUserGestureForFullscreenRestriction = 1 << 2, |
307 RequirePageConsentToLoadMediaRestriction = 1 << 3, | 309 RequirePageConsentToLoadMediaRestriction = 1 << 3, |
308 }; | 310 }; |
309 typedef unsigned BehaviorRestrictions; | 311 typedef unsigned BehaviorRestrictions; |
310 | 312 |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
596 inline bool isHTMLMediaElement(const Node& node) | 598 inline bool isHTMLMediaElement(const Node& node) |
597 { | 599 { |
598 return node.isElementNode() && toElement(node).isMediaElement(); | 600 return node.isElementNode() && toElement(node).isMediaElement(); |
599 } | 601 } |
600 | 602 |
601 DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); | 603 DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); |
602 | 604 |
603 } //namespace | 605 } //namespace |
604 | 606 |
605 #endif | 607 #endif |
OLD | NEW |