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" |
| 11 #include "core/editing/Position.h" |
10 #include "platform/Timer.h" | 12 #include "platform/Timer.h" |
11 | 13 |
12 namespace blink { | 14 namespace blink { |
13 | 15 |
14 class LocalFrame; | 16 class LocalFrame; |
15 class SpellCheckRequester; | 17 class SpellCheckRequester; |
16 | 18 |
17 #define FOR_EACH_IDLE_SPELL_CHECK_CALLBACK_STATE(V) \ | 19 #define FOR_EACH_IDLE_SPELL_CHECK_CALLBACK_STATE(V) \ |
18 V(Inactive) \ | 20 V(Inactive) \ |
19 V(HotModeRequested) \ | 21 V(HotModeRequested) \ |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 void coldModeInvocation(IdleDeadline*); | 88 void coldModeInvocation(IdleDeadline*); |
87 bool coldModeFinishesFullDocument() const; | 89 bool coldModeFinishesFullDocument() const; |
88 | 90 |
89 // Implements |SynchronousMutationObserver|. | 91 // Implements |SynchronousMutationObserver|. |
90 void contextDestroyed(Document*) final; | 92 void contextDestroyed(Document*) final; |
91 | 93 |
92 State m_state; | 94 State m_state; |
93 int m_idleCallbackHandle; | 95 int m_idleCallbackHandle; |
94 mutable bool m_needsMoreColdModeInvocationForTesting; | 96 mutable bool m_needsMoreColdModeInvocationForTesting; |
95 const Member<LocalFrame> m_frame; | 97 const Member<LocalFrame> m_frame; |
96 | 98 uint64_t m_lastProcessedUndoStepSequence; |
97 TaskRunnerTimer<IdleSpellCheckCallback> m_coldModeTimer; | 99 TaskRunnerTimer<IdleSpellCheckCallback> m_coldModeTimer; |
98 }; | 100 }; |
99 | 101 |
100 } // namespace blink | 102 } // namespace blink |
101 | 103 |
102 #endif // IdleSpellCheckCallback_h | 104 #endif // IdleSpellCheckCallback_h |
OLD | NEW |