Index: third_party/WebKit/Source/core/editing/spellcheck/IdleSpellCheckCallback.cpp |
diff --git a/third_party/WebKit/Source/core/editing/spellcheck/IdleSpellCheckCallback.cpp b/third_party/WebKit/Source/core/editing/spellcheck/IdleSpellCheckCallback.cpp |
index bdab6eb0cc4580bbe1216e5178f32e99cbb0f018..7ce3ead9917c01981f1df7aaea0b2a3d95d49b6c 100644 |
--- a/third_party/WebKit/Source/core/editing/spellcheck/IdleSpellCheckCallback.cpp |
+++ b/third_party/WebKit/Source/core/editing/spellcheck/IdleSpellCheckCallback.cpp |
@@ -49,11 +49,22 @@ IdleSpellCheckCallback::IdleSpellCheckCallback(LocalFrame& frame) |
m_frame(frame), |
m_coldModeTimer(this, &IdleSpellCheckCallback::coldModeTimerFired) {} |
+SpellCheckRequester& IdleSpellCheckCallback::spellCheckRequester() const { |
+ // TODO(xiaochengh): decouple with SpellChecker after SpellCheckRequester is |
+ // moved to IdleSpellCheckCallback. |
+ return frame().spellChecker().spellCheckRequester(); |
+} |
+ |
bool IdleSpellCheckCallback::isSpellCheckingEnabled() const { |
// TODO(xiaochengh): decouple with SpellChecker. |
return frame().spellChecker().isSpellCheckingEnabled(); |
} |
+void IdleSpellCheckCallback::prepareForLeakDetection() { |
+ if (RuntimeEnabledFeatures::idleTimeSpellCheckingEnabled()) |
+ spellCheckRequester().prepareForLeakDetection(); |
+} |
+ |
void IdleSpellCheckCallback::requestInvocation() { |
IdleRequestOptions options; |
options.setTimeout(kRequestTimeoutMS); |