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

Unified Diff: third_party/WebKit/Source/core/testing/Internals.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/testing/Internals.cpp
diff --git a/third_party/WebKit/Source/core/testing/Internals.cpp b/third_party/WebKit/Source/core/testing/Internals.cpp
index fac050ef188f617790871c85d04c10e0e52999d6..26953fe673f8dc41972be9f783a3339c3220cf3f 100644
--- a/third_party/WebKit/Source/core/testing/Internals.cpp
+++ b/third_party/WebKit/Source/core/testing/Internals.cpp
@@ -67,6 +67,7 @@
#include "core/editing/markers/DocumentMarker.h"
#include "core/editing/markers/DocumentMarkerController.h"
#include "core/editing/serializers/Serialization.h"
+#include "core/editing/spellcheck/IdleSpellCheckCallback.h"
#include "core/editing/spellcheck/SpellCheckRequester.h"
#include "core/editing/spellcheck/SpellChecker.h"
#include "core/fetch/MemoryCache.h"
@@ -197,7 +198,9 @@ static WTF::Optional<DocumentMarker::MarkerTypes> markerTypesFrom(
static SpellCheckRequester* spellCheckRequester(Document* document) {
if (!document || !document->frame())
return 0;
- return &document->frame()->spellChecker().spellCheckRequester();
+ if (!RuntimeEnabledFeatures::idleTimeSpellCheckingEnabled())
+ return &document->frame()->spellChecker().spellCheckRequester();
+ return &document->frame()->idleSpellCheckCallback().spellCheckRequester();
}
static ScrollableArea* scrollableAreaForNode(Node* node) {
« no previous file with comments | « third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp ('k') | third_party/WebKit/Source/web/WebLeakDetector.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698