Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / html / HTMLSourceElement.h
index 339c12a..756ca3c 100644 (file)
 #ifndef HTMLSourceElement_h
 #define HTMLSourceElement_h
 
+#include "core/css/MediaQueryListListener.h"
 #include "core/html/HTMLElement.h"
 #include "platform/Timer.h"
 
-namespace WebCore {
+namespace blink {
 
 template<typename T> class EventSender;
 typedef EventSender<HTMLSourceElement> SourceEventSender;
 
 class HTMLSourceElement FINAL : public HTMLElement {
 public:
+    class Listener;
+
     DECLARE_NODE_FACTORY(HTMLSourceElement);
     virtual ~HTMLSourceElement();
 
@@ -48,6 +51,10 @@ public:
 
     void dispatchPendingEvent(SourceEventSender*);
 
+    bool mediaQueryMatches() const;
+
+    virtual void trace(Visitor*) OVERRIDE;
+
 private:
     explicit HTMLSourceElement(Document&);
 
@@ -55,8 +62,13 @@ private:
     virtual void removedFrom(ContainerNode*) OVERRIDE;
     virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
     virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
+
+    void notifyMediaQueryChanged();
+
+    RefPtrWillBeMember<MediaQueryList> m_mediaQueryList;
+    RefPtrWillBeMember<Listener> m_listener;
 };
 
-} // namespace WebCore
+} // namespace blink
 
 #endif