| 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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 | 287 |
| 288 virtual void reportMemoryUsage(MemoryObjectInfo*) const; | 288 virtual void reportMemoryUsage(MemoryObjectInfo*) const; |
| 289 | 289 |
| 290 protected: | 290 protected: |
| 291 HTMLMediaElement(const QualifiedName&, Document*, bool); | 291 HTMLMediaElement(const QualifiedName&, Document*, bool); |
| 292 virtual ~HTMLMediaElement(); | 292 virtual ~HTMLMediaElement(); |
| 293 | 293 |
| 294 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; | 294 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; |
| 295 virtual void finishParsingChildren(); | 295 virtual void finishParsingChildren(); |
| 296 virtual bool isURLAttribute(const Attribute&) const OVERRIDE; | 296 virtual bool isURLAttribute(const Attribute&) const OVERRIDE; |
| 297 virtual void attach() OVERRIDE; | 297 virtual void attach(const AttachContext& = AttachContext()) OVERRIDE; |
| 298 | 298 |
| 299 virtual void didMoveToNewDocument(Document* oldDocument) OVERRIDE; | 299 virtual void didMoveToNewDocument(Document* oldDocument) OVERRIDE; |
| 300 | 300 |
| 301 enum DisplayMode { Unknown, None, Poster, PosterWaitingForVideo, Video }; | 301 enum DisplayMode { Unknown, None, Poster, PosterWaitingForVideo, Video }; |
| 302 DisplayMode displayMode() const { return m_displayMode; } | 302 DisplayMode displayMode() const { return m_displayMode; } |
| 303 virtual void setDisplayMode(DisplayMode mode) { m_displayMode = mode; } | 303 virtual void setDisplayMode(DisplayMode mode) { m_displayMode = mode; } |
| 304 | 304 |
| 305 virtual bool isMediaElement() const { return true; } | 305 virtual bool isMediaElement() const { return true; } |
| 306 | 306 |
| 307 // Restrictions to change default behaviors. | 307 // Restrictions to change default behaviors. |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 603 | 603 |
| 604 inline HTMLMediaElement* toMediaElement(Node* node) | 604 inline HTMLMediaElement* toMediaElement(Node* node) |
| 605 { | 605 { |
| 606 ASSERT_WITH_SECURITY_IMPLICATION(!node || isMediaElement(node)); | 606 ASSERT_WITH_SECURITY_IMPLICATION(!node || isMediaElement(node)); |
| 607 return static_cast<HTMLMediaElement*>(node); | 607 return static_cast<HTMLMediaElement*>(node); |
| 608 } | 608 } |
| 609 | 609 |
| 610 } //namespace | 610 } //namespace |
| 611 | 611 |
| 612 #endif | 612 #endif |
| OLD | NEW |