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

Unified Diff: Source/core/dom/ScriptedAnimationController.h

Issue 337883003: Call media query change listeners asynchronously. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix typo Created 6 years, 6 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
Index: Source/core/dom/ScriptedAnimationController.h
diff --git a/Source/core/dom/ScriptedAnimationController.h b/Source/core/dom/ScriptedAnimationController.h
index c148a2f77cbbd86feffb97416d03434abec31515..751deee8f0b02a6e2a01e9a84fad8d8244b3726d 100644
--- a/Source/core/dom/ScriptedAnimationController.h
+++ b/Source/core/dom/ScriptedAnimationController.h
@@ -38,6 +38,7 @@ namespace WebCore {
class Document;
class Event;
class EventTarget;
+class MediaQueryListListener;
class RequestAnimationFrameCallback;
class ScriptedAnimationController : public RefCountedWillBeGarbageCollectedFinalized<ScriptedAnimationController> {
@@ -58,6 +59,7 @@ public:
void enqueueEvent(PassRefPtrWillBeRawPtr<Event>);
void enqueuePerFrameEvent(PassRefPtrWillBeRawPtr<Event>);
+ void enqueueMediaQueryChangeListeners(WillBeHeapVector<RefPtrWillBeMember<MediaQueryListListener> >&);
void suspend();
void resume();
@@ -69,6 +71,7 @@ private:
void dispatchEvents();
void executeCallbacks(double monotonicTimeNow);
+ void callMediaQueryListListeners();
typedef Vector<OwnPtr<RequestAnimationFrameCallback> > CallbackList;
CallbackList m_callbacks;
@@ -79,6 +82,8 @@ private:
int m_suspendCount;
WillBeHeapVector<RefPtrWillBeMember<Event> > m_eventQueue;
WillBeHeapListHashSet<std::pair<RawPtrWillBeMember<const EventTarget>, const StringImpl*> > m_perFrameEvents;
+ typedef WillBeHeapListHashSet<RefPtrWillBeMember<MediaQueryListListener> > MediaQueryListListeners;
+ MediaQueryListListeners m_mediaQueryListListeners;
};
}

Powered by Google App Engine
This is Rietveld 408576698