OLD | NEW |
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 // ActiveDOMObject | 51 // ActiveDOMObject |
52 virtual void contextDestroyed() override; | 52 virtual void contextDestroyed() override; |
53 virtual void stop() override; | 53 virtual void stop() override; |
54 | 54 |
55 // The following are essentially constants. All intervals are in seconds. | 55 // The following are essentially constants. All intervals are in seconds. |
56 static double hiddenPageAlignmentInterval(); | 56 static double hiddenPageAlignmentInterval(); |
57 static double visiblePageAlignmentInterval(); | 57 static double visiblePageAlignmentInterval(); |
58 | 58 |
59 void trace(Visitor*) { } | 59 void trace(Visitor*) { } |
60 | 60 |
| 61 void dispose(); |
| 62 |
61 private: | 63 private: |
62 friend class ExecutionContext; // For create(). | 64 friend class ExecutionContext; // For create(). |
63 | 65 |
64 // Should only be used by ExecutionContext. | 66 // Should only be used by ExecutionContext. |
65 static PassOwnPtrWillBeRawPtr<DOMTimer> create(ExecutionContext* context, Pa
ssOwnPtr<ScheduledAction> action, int timeout, bool singleShot, int timeoutID) | 67 static PassOwnPtrWillBeRawPtr<DOMTimer> create(ExecutionContext* context, Pa
ssOwnPtr<ScheduledAction> action, int timeout, bool singleShot, int timeoutID) |
66 { | 68 { |
67 return adoptPtrWillBeNoop(new DOMTimer(context, action, timeout, singleS
hot, timeoutID)); | 69 return adoptPtrWillBeNoop(new DOMTimer(context, action, timeout, singleS
hot, timeoutID)); |
68 } | 70 } |
69 | 71 |
70 DOMTimer(ExecutionContext*, PassOwnPtr<ScheduledAction>, int interval, bool
singleShot, int timeoutID); | 72 DOMTimer(ExecutionContext*, PassOwnPtr<ScheduledAction>, int interval, bool
singleShot, int timeoutID); |
71 virtual void fired() override; | 73 virtual void fired() override; |
72 | 74 |
73 // Retuns timer fire time rounded to the next multiple of timer alignment in
terval. | 75 // Retuns timer fire time rounded to the next multiple of timer alignment in
terval. |
74 virtual double alignedFireTime(double) const override; | 76 virtual double alignedFireTime(double) const override; |
75 | 77 |
76 int m_timeoutID; | 78 int m_timeoutID; |
77 int m_nestingLevel; | 79 int m_nestingLevel; |
78 OwnPtr<ScheduledAction> m_action; | 80 OwnPtr<ScheduledAction> m_action; |
79 RefPtr<UserGestureToken> m_userGestureToken; | 81 RefPtr<UserGestureToken> m_userGestureToken; |
80 }; | 82 }; |
81 | 83 |
82 } // namespace blink | 84 } // namespace blink |
83 | 85 |
84 #endif // DOMTimer_h | 86 #endif // DOMTimer_h |
OLD | NEW |