OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef IdleSpellCheckCallback_h | 5 #ifndef IdleSpellCheckCallback_h |
6 #define IdleSpellCheckCallback_h | 6 #define IdleSpellCheckCallback_h |
7 | 7 |
8 #include "core/dom/IdleRequestCallback.h" | 8 #include "core/dom/IdleRequestCallback.h" |
9 #include "core/dom/SynchronousMutationObserver.h" | 9 #include "core/dom/SynchronousMutationObserver.h" |
10 #include "core/editing/EphemeralRange.h" | 10 #include "core/editing/EphemeralRange.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 void hotModeInvocation(IdleDeadline*); | 77 void hotModeInvocation(IdleDeadline*); |
78 | 78 |
79 // Transit to ColdModeTimerStarted, if possible. Sets up a timer, and requests | 79 // Transit to ColdModeTimerStarted, if possible. Sets up a timer, and requests |
80 // cold mode invocation if no critical operation occurs before timer firing. | 80 // cold mode invocation if no critical operation occurs before timer firing. |
81 void setNeedsColdModeInvocation(); | 81 void setNeedsColdModeInvocation(); |
82 | 82 |
83 // Functions for cold mode. | 83 // Functions for cold mode. |
84 void coldModeTimerFired(TimerBase*); | 84 void coldModeTimerFired(TimerBase*); |
85 void coldModeInvocation(IdleDeadline*); | 85 void coldModeInvocation(IdleDeadline*); |
86 bool coldModeFinishesFullDocument() const; | 86 bool coldModeFinishesFullDocument() const; |
| 87 void chunkAndRequestFullCheckingFor(const Element&); |
87 | 88 |
88 // Implements |SynchronousMutationObserver|. | 89 // Implements |SynchronousMutationObserver|. |
89 void contextDestroyed(Document*) final; | 90 void contextDestroyed(Document*) final; |
90 | 91 |
91 State m_state; | 92 State m_state; |
92 int m_idleCallbackHandle; | 93 int m_idleCallbackHandle; |
93 mutable bool m_needsMoreColdModeInvocationForTesting; | 94 mutable bool m_needsMoreColdModeInvocationForTesting; |
94 const Member<LocalFrame> m_frame; | 95 const Member<LocalFrame> m_frame; |
95 uint64_t m_lastProcessedUndoStepSequence; | 96 uint64_t m_lastProcessedUndoStepSequence; |
| 97 uint64_t m_lastCheckedDOMTreeVersionInColdMode; |
| 98 Member<Node> m_nextNodeInColdMode; |
96 TaskRunnerTimer<IdleSpellCheckCallback> m_coldModeTimer; | 99 TaskRunnerTimer<IdleSpellCheckCallback> m_coldModeTimer; |
97 }; | 100 }; |
98 | 101 |
99 } // namespace blink | 102 } // namespace blink |
100 | 103 |
101 #endif // IdleSpellCheckCallback_h | 104 #endif // IdleSpellCheckCallback_h |
OLD | NEW |