Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: third_party/WebKit/Source/core/editing/spellcheck/IdleSpellCheckCallback.h

Issue 2734013002: Implement cold mode invocation for idle time spell checker (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 void hotModeInvocation(IdleDeadline*); 80 void hotModeInvocation(IdleDeadline*);
81 81
82 // Transit to ColdModeTimerStarted, if possible. Sets up a timer, and requests 82 // Transit to ColdModeTimerStarted, if possible. Sets up a timer, and requests
83 // cold mode invocation if no critical operation occurs before timer firing. 83 // cold mode invocation if no critical operation occurs before timer firing.
84 void setNeedsColdModeInvocation(); 84 void setNeedsColdModeInvocation();
85 85
86 // Functions for cold mode. 86 // Functions for cold mode.
87 void coldModeTimerFired(TimerBase*); 87 void coldModeTimerFired(TimerBase*);
88 void coldModeInvocation(IdleDeadline*); 88 void coldModeInvocation(IdleDeadline*);
89 bool coldModeFinishesFullDocument() const; 89 bool coldModeFinishesFullDocument() const;
90 void chunkAndRequestFullCheckingFor(const Element&);
90 91
91 // Implements |SynchronousMutationObserver|. 92 // Implements |SynchronousMutationObserver|.
92 void contextDestroyed(Document*) final; 93 void contextDestroyed(Document*) final;
93 94
94 State m_state; 95 State m_state;
95 int m_idleCallbackHandle; 96 int m_idleCallbackHandle;
96 mutable bool m_needsMoreColdModeInvocationForTesting; 97 mutable bool m_needsMoreColdModeInvocationForTesting;
97 const Member<LocalFrame> m_frame; 98 const Member<LocalFrame> m_frame;
98 uint64_t m_lastProcessedUndoStepSequence; 99 uint64_t m_lastProcessedUndoStepSequence;
100 uint64_t m_lastCheckedDOMTreeVersionInColdMode;
101 Member<Node> m_nextNodeInColdMode;
99 TaskRunnerTimer<IdleSpellCheckCallback> m_coldModeTimer; 102 TaskRunnerTimer<IdleSpellCheckCallback> m_coldModeTimer;
100 }; 103 };
101 104
102 } // namespace blink 105 } // namespace blink
103 106
104 #endif // IdleSpellCheckCallback_h 107 #endif // IdleSpellCheckCallback_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698