| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2010 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 13 matching lines...) Expand all Loading... |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #ifndef HTMLSourceElement_h | 26 #ifndef HTMLSourceElement_h |
| 27 #define HTMLSourceElement_h | 27 #define HTMLSourceElement_h |
| 28 | 28 |
| 29 #include "core/html/HTMLElement.h" | 29 #include "core/html/HTMLElement.h" |
| 30 #include "platform/Timer.h" | 30 #include "platform/Timer.h" |
| 31 | 31 |
| 32 namespace WebCore { | 32 namespace WebCore { |
| 33 | 33 |
| 34 template<typename T> class EventSender; |
| 35 typedef EventSender<HTMLSourceElement> SourceEventSender; |
| 36 |
| 34 class HTMLSourceElement FINAL : public HTMLElement { | 37 class HTMLSourceElement FINAL : public HTMLElement { |
| 35 public: | 38 public: |
| 36 static PassRefPtr<HTMLSourceElement> create(Document&); | 39 static PassRefPtr<HTMLSourceElement> create(Document&); |
| 40 virtual ~HTMLSourceElement(); |
| 37 | 41 |
| 38 const AtomicString& type() const; | 42 const AtomicString& type() const; |
| 39 void setSrc(const String&); | 43 void setSrc(const String&); |
| 40 void setType(const AtomicString&); | 44 void setType(const AtomicString&); |
| 41 | 45 |
| 42 void scheduleErrorEvent(); | 46 void scheduleErrorEvent(); |
| 43 void cancelPendingErrorEvent(); | 47 void cancelPendingErrorEvent(); |
| 44 | 48 |
| 49 void dispatchPendingEvent(SourceEventSender*); |
| 50 |
| 45 private: | 51 private: |
| 46 explicit HTMLSourceElement(Document&); | 52 explicit HTMLSourceElement(Document&); |
| 47 | 53 |
| 48 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; | 54 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; |
| 49 virtual void removedFrom(ContainerNode*) OVERRIDE; | 55 virtual void removedFrom(ContainerNode*) OVERRIDE; |
| 50 virtual bool isURLAttribute(const Attribute&) const OVERRIDE; | 56 virtual bool isURLAttribute(const Attribute&) const OVERRIDE; |
| 51 | |
| 52 void errorEventTimerFired(Timer<HTMLSourceElement>*); | |
| 53 | |
| 54 Timer<HTMLSourceElement> m_errorEventTimer; | |
| 55 }; | 57 }; |
| 56 | 58 |
| 57 } // namespace WebCore | 59 } // namespace WebCore |
| 58 | 60 |
| 59 #endif | 61 #endif |
| OLD | NEW |