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

Side by Side Diff: Source/core/frame/DOMTimer.h

Issue 847803002: Make ScriptStreamer and dependents Oilpan friendly. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add ScriptSourceCode::isNull() comment Created 5 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/PendingScript.cpp ('k') | Source/core/frame/DOMTimer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 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 25 matching lines...) Expand all
36 #include "wtf/RefPtr.h" 36 #include "wtf/RefPtr.h"
37 37
38 namespace blink { 38 namespace blink {
39 39
40 class ExecutionContext; 40 class ExecutionContext;
41 41
42 class DOMTimer final : public RefCountedWillBeGarbageCollectedFinalized<DOMTimer >, public SuspendableTimer { 42 class DOMTimer final : public RefCountedWillBeGarbageCollectedFinalized<DOMTimer >, public SuspendableTimer {
43 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(DOMTimer); 43 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(DOMTimer);
44 public: 44 public:
45 // Creates a new timer owned by the ExecutionContext, starts it and returns its ID. 45 // Creates a new timer owned by the ExecutionContext, starts it and returns its ID.
46 static int install(ExecutionContext*, PassOwnPtr<ScheduledAction>, int timeo ut, bool singleShot); 46 static int install(ExecutionContext*, PassOwnPtrWillBeRawPtr<ScheduledAction >, int timeout, bool singleShot);
47 static void removeByID(ExecutionContext*, int timeoutID); 47 static void removeByID(ExecutionContext*, int timeoutID);
48 48
49 virtual ~DOMTimer(); 49 virtual ~DOMTimer();
50 50
51 // ActiveDOMObject 51 // ActiveDOMObject
52 virtual void stop() override; 52 virtual void stop() override;
53 53
54 // The following are essentially constants. All intervals are in seconds. 54 // The following are essentially constants. All intervals are in seconds.
55 static double hiddenPageAlignmentInterval(); 55 static double hiddenPageAlignmentInterval();
56 static double visiblePageAlignmentInterval(); 56 static double visiblePageAlignmentInterval();
57 57
58 virtual void trace(Visitor*) override; 58 virtual void trace(Visitor*) override;
59 59
60 void dispose(); 60 void dispose();
61 61
62 private: 62 private:
63 friend class DOMTimerCoordinator; // For create(). 63 friend class DOMTimerCoordinator; // For create().
64 64
65 static PassRefPtrWillBeRawPtr<DOMTimer> create(ExecutionContext* context, Pa ssOwnPtr<ScheduledAction> action, int timeout, bool singleShot, int timeoutID) 65 static PassRefPtrWillBeRawPtr<DOMTimer> create(ExecutionContext* context, Pa ssOwnPtrWillBeRawPtr<ScheduledAction> action, int timeout, bool singleShot, int timeoutID)
66 { 66 {
67 return adoptRefWillBeNoop(new DOMTimer(context, action, timeout, singleS hot, timeoutID)); 67 return adoptRefWillBeNoop(new DOMTimer(context, action, timeout, singleS hot, timeoutID));
68 } 68 }
69 69
70 DOMTimer(ExecutionContext*, PassOwnPtr<ScheduledAction>, int interval, bool singleShot, int timeoutID); 70 DOMTimer(ExecutionContext*, PassOwnPtrWillBeRawPtr<ScheduledAction>, int int erval, bool singleShot, int timeoutID);
71 virtual void fired() override; 71 virtual void fired() override;
72 72
73 // Retuns timer fire time rounded to the next multiple of timer alignment in terval. 73 // Retuns timer fire time rounded to the next multiple of timer alignment in terval.
74 virtual double alignedFireTime(double) const override; 74 virtual double alignedFireTime(double) const override;
75 75
76 int m_timeoutID; 76 int m_timeoutID;
77 int m_nestingLevel; 77 int m_nestingLevel;
78 OwnPtr<ScheduledAction> m_action; 78 OwnPtrWillBeMember<ScheduledAction> m_action;
79 RefPtr<UserGestureToken> m_userGestureToken; 79 RefPtr<UserGestureToken> m_userGestureToken;
80 }; 80 };
81 81
82 } // namespace blink 82 } // namespace blink
83 83
84 #endif // DOMTimer_h 84 #endif // DOMTimer_h
OLDNEW
« no previous file with comments | « Source/core/dom/PendingScript.cpp ('k') | Source/core/frame/DOMTimer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698