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