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

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

Issue 8894015: Merge 102405 - Source/WebCore: Improve handling of frame removal during requestAnimationFrame cal... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/912/
Patch Set: Created 9 years 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 | « Source/WebCore/dom/Document.cpp ('k') | Source/WebCore/dom/ScriptedAnimationController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/dom/ScriptedAnimationController.h
===================================================================
--- Source/WebCore/dom/ScriptedAnimationController.h (revision 102462)
+++ Source/WebCore/dom/ScriptedAnimationController.h (working copy)
@@ -35,8 +35,7 @@
#include "Timer.h"
#endif
#include "PlatformScreen.h"
-#include <wtf/Noncopyable.h>
-#include <wtf/PassOwnPtr.h>
+#include <wtf/RefCounted.h>
#include <wtf/RefPtr.h>
#include <wtf/Vector.h>
@@ -46,17 +45,18 @@
class Element;
class RequestAnimationFrameCallback;
-class ScriptedAnimationController
+class ScriptedAnimationController : public RefCounted<ScriptedAnimationController>
#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
- : public DisplayRefreshMonitorClient
+ , public DisplayRefreshMonitorClient
#endif
{
-WTF_MAKE_NONCOPYABLE(ScriptedAnimationController);
public:
- static PassOwnPtr<ScriptedAnimationController> create(Document* document, PlatformDisplayID displayID)
+ static PassRefPtr<ScriptedAnimationController> create(Document* document, PlatformDisplayID displayID)
{
- return adoptPtr(new ScriptedAnimationController(document, displayID));
+ return adoptRef(new ScriptedAnimationController(document, displayID));
}
+ ~ScriptedAnimationController();
+ void clearDocumentPointer() { m_document = 0; }
typedef int CallbackId;
@@ -70,7 +70,7 @@
void windowScreenDidChange(PlatformDisplayID);
private:
- explicit ScriptedAnimationController(Document*, PlatformDisplayID);
+ ScriptedAnimationController(Document*, PlatformDisplayID);
typedef Vector<RefPtr<RequestAnimationFrameCallback> > CallbackList;
CallbackList m_callbacks;
« no previous file with comments | « Source/WebCore/dom/Document.cpp ('k') | Source/WebCore/dom/ScriptedAnimationController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698