Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(597)

Unified Diff: Source/core/css/MediaQueryList.h

Issue 397403002: Make MediaQueryList an ActiveDOMElement (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: need ActiveDOMObject in IDL Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/media/media-query-listener-gc-expected.txt ('k') | Source/core/css/MediaQueryList.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/MediaQueryList.h
diff --git a/Source/core/css/MediaQueryList.h b/Source/core/css/MediaQueryList.h
index 903467ac210d9a6658005298e95a9351415ef05b..52c73ef0a7ec4f39b30c8a495257824be1a3d9cb 100644
--- a/Source/core/css/MediaQueryList.h
+++ b/Source/core/css/MediaQueryList.h
@@ -20,6 +20,7 @@
#ifndef MediaQueryList_h
#define MediaQueryList_h
+#include "core/dom/ActiveDOMObject.h"
#include "platform/heap/Handle.h"
#include "wtf/Forward.h"
#include "wtf/RefCounted.h"
@@ -27,6 +28,7 @@
namespace blink {
+class ExecutionContext;
class MediaQueryListListener;
class MediaQueryEvaluator;
class MediaQueryMatcher;
@@ -37,9 +39,9 @@ class MediaQuerySet;
// retrieve the current value of the given media query and to add/remove listeners that
// will be called whenever the value of the query changes.
-class MediaQueryList FINAL : public RefCountedWillBeGarbageCollectedFinalized<MediaQueryList> {
+class MediaQueryList FINAL : public RefCountedWillBeGarbageCollectedFinalized<MediaQueryList>, public ActiveDOMObject {
public:
- static PassRefPtrWillBeRawPtr<MediaQueryList> create(PassRefPtrWillBeRawPtr<MediaQueryMatcher>, PassRefPtrWillBeRawPtr<MediaQuerySet>);
+ static PassRefPtrWillBeRawPtr<MediaQueryList> create(ExecutionContext*, PassRefPtrWillBeRawPtr<MediaQueryMatcher>, PassRefPtrWillBeRawPtr<MediaQuerySet>);
virtual ~MediaQueryList();
String media() const;
@@ -52,10 +54,12 @@ public:
void trace(Visitor*);
- void documentDetached();
+ // From ActiveDOMObject
+ virtual bool hasPendingActivity() const OVERRIDE;
+ virtual void stop() OVERRIDE;
private:
- MediaQueryList(PassRefPtrWillBeRawPtr<MediaQueryMatcher>, PassRefPtrWillBeRawPtr<MediaQuerySet>);
+ MediaQueryList(ExecutionContext*, PassRefPtrWillBeRawPtr<MediaQueryMatcher>, PassRefPtrWillBeRawPtr<MediaQuerySet>);
bool updateMatches();
« no previous file with comments | « LayoutTests/fast/media/media-query-listener-gc-expected.txt ('k') | Source/core/css/MediaQueryList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698