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 10 matching lines...) Expand all Loading... |
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
24 * | 24 * |
25 */ | 25 */ |
26 | 26 |
27 #ifndef DOMTimer_h | 27 #ifndef DOMTimer_h |
28 #define DOMTimer_h | 28 #define DOMTimer_h |
29 | 29 |
30 #include "bindings/core/v8/ScheduledAction.h" | 30 #include "bindings/core/v8/ScheduledAction.h" |
| 31 #include "core/CoreExport.h" |
31 #include "core/frame/SuspendableTimer.h" | 32 #include "core/frame/SuspendableTimer.h" |
32 #include "platform/UserGestureIndicator.h" | 33 #include "platform/UserGestureIndicator.h" |
33 #include "platform/heap/Handle.h" | 34 #include "platform/heap/Handle.h" |
34 #include "wtf/OwnPtr.h" | 35 #include "wtf/OwnPtr.h" |
35 #include "wtf/PassOwnPtr.h" | 36 #include "wtf/PassOwnPtr.h" |
36 #include "wtf/RefPtr.h" | 37 #include "wtf/RefPtr.h" |
37 | 38 |
38 namespace blink { | 39 namespace blink { |
39 | 40 |
40 class ExecutionContext; | 41 class ExecutionContext; |
41 | 42 |
42 class DOMTimer final : public RefCountedWillBeGarbageCollectedFinalized<DOMTimer
>, public SuspendableTimer { | 43 class CORE_EXPORT DOMTimer final : public RefCountedWillBeGarbageCollectedFinali
zed<DOMTimer>, public SuspendableTimer { |
43 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(DOMTimer); | 44 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(DOMTimer); |
44 public: | 45 public: |
45 // Creates a new timer owned by the ExecutionContext, starts it and returns
its ID. | 46 // Creates a new timer owned by the ExecutionContext, starts it and returns
its ID. |
46 static int install(ExecutionContext*, PassOwnPtrWillBeRawPtr<ScheduledAction
>, int timeout, bool singleShot); | 47 static int install(ExecutionContext*, PassOwnPtrWillBeRawPtr<ScheduledAction
>, int timeout, bool singleShot); |
47 static void removeByID(ExecutionContext*, int timeoutID); | 48 static void removeByID(ExecutionContext*, int timeoutID); |
48 | 49 |
49 virtual ~DOMTimer(); | 50 virtual ~DOMTimer(); |
50 | 51 |
51 // ActiveDOMObject | 52 // ActiveDOMObject |
52 virtual void stop() override; | 53 virtual void stop() override; |
(...skipping 22 matching lines...) Expand all Loading... |
75 | 76 |
76 int m_timeoutID; | 77 int m_timeoutID; |
77 int m_nestingLevel; | 78 int m_nestingLevel; |
78 OwnPtrWillBeMember<ScheduledAction> m_action; | 79 OwnPtrWillBeMember<ScheduledAction> m_action; |
79 RefPtr<UserGestureToken> m_userGestureToken; | 80 RefPtr<UserGestureToken> m_userGestureToken; |
80 }; | 81 }; |
81 | 82 |
82 } // namespace blink | 83 } // namespace blink |
83 | 84 |
84 #endif // DOMTimer_h | 85 #endif // DOMTimer_h |
OLD | NEW |