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

Unified Diff: third_party/WebKit/Source/core/editing/spellcheck/IdleSpellCheckCallback.cpp

Issue 2580773002: Let IdleSpellCheckCallback take full control over SpellCheckRequester (Closed)
Patch Set: Add CORE_EXPORT to IdleRequestCallback Created 4 years 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 side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698