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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 DECLARE_VIRTUAL_TRACE(); |
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
ssOwnPtrWillBeRawPtr<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*, PassOwnPtrWillBeRawPtr<ScheduledAction>, int int
erval, 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 OwnPtrWillBeMember<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 |
OLD | NEW |