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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 | 46 |
47 // ActiveDOMObject | 47 // ActiveDOMObject |
48 virtual void contextDestroyed(); | 48 virtual void contextDestroyed(); |
49 virtual void stop(); | 49 virtual void stop(); |
50 | 50 |
51 // Adjust to a change in the ScriptExecutionContext's minimum timer inte
rval. | 51 // Adjust to a change in the ScriptExecutionContext's minimum timer inte
rval. |
52 // This allows the minimum allowable interval time to be changed in resp
onse | 52 // This allows the minimum allowable interval time to be changed in resp
onse |
53 // to events like moving a tab to the background. | 53 // to events like moving a tab to the background. |
54 void adjustMinimumTimerInterval(double oldMinimumTimerInterval); | 54 void adjustMinimumTimerInterval(double oldMinimumTimerInterval); |
55 | 55 |
56 virtual void reportMemoryUsage(MemoryObjectInfo*) const OVERRIDE; | |
57 | |
58 private: | 56 private: |
59 DOMTimer(ScriptExecutionContext*, PassOwnPtr<ScheduledAction>, int inter
val, bool singleShot); | 57 DOMTimer(ScriptExecutionContext*, PassOwnPtr<ScheduledAction>, int inter
val, bool singleShot); |
60 virtual void fired(); | 58 virtual void fired(); |
61 | 59 |
62 double intervalClampedToMinimum(int timeout, double minimumTimerInterval
) const; | 60 double intervalClampedToMinimum(int timeout, double minimumTimerInterval
) const; |
63 | 61 |
64 // Retuns timer fire time rounded to the next multiple of timer alignmen
t interval. | 62 // Retuns timer fire time rounded to the next multiple of timer alignmen
t interval. |
65 virtual double alignedFireTime(double) const; | 63 virtual double alignedFireTime(double) const; |
66 | 64 |
67 int m_timeoutId; | 65 int m_timeoutId; |
68 int m_nestingLevel; | 66 int m_nestingLevel; |
69 OwnPtr<ScheduledAction> m_action; | 67 OwnPtr<ScheduledAction> m_action; |
70 int m_originalInterval; | 68 int m_originalInterval; |
71 RefPtr<UserGestureToken> m_userGestureToken; | 69 RefPtr<UserGestureToken> m_userGestureToken; |
72 }; | 70 }; |
73 | 71 |
74 } // namespace WebCore | 72 } // namespace WebCore |
75 | 73 |
76 #endif // DOMTimer_h | 74 #endif // DOMTimer_h |
77 | 75 |
OLD | NEW |