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

Unified Diff: third_party/WebKit/Source/core/frame/LocalFrame.cpp

Issue 2701983002: Implement complete lifecycle transition for IdleSpellCheckCallback (Closed)
Patch Set: Add lifecycle transition unit tests Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/frame/LocalFrame.cpp
diff --git a/third_party/WebKit/Source/core/frame/LocalFrame.cpp b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
index 6d5853967979d907d2af3e104cb201bd7ab28150..31e26949d7718a3f7837fdc1b5bbeae0ed0797a6 100644
--- a/third_party/WebKit/Source/core/frame/LocalFrame.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
@@ -516,6 +516,8 @@ void LocalFrame::documentAttached() {
DCHECK(document());
selection().documentAttached(document());
inputMethodController().documentAttached(document());
+ if (RuntimeEnabledFeatures::idleTimeSpellCheckingEnabled())
+ idleSpellCheckCallback().documentAttached(document());
}
LocalDOMWindow* LocalFrame::domWindow() const {
@@ -902,6 +904,12 @@ PluginData* LocalFrame::pluginData() const {
tree().top()->securityContext()->getSecurityOrigin());
}
+void LocalFrame::setNeedsSpellChecking() {
+ if (!RuntimeEnabledFeatures::idleTimeSpellCheckingEnabled())
+ return;
+ idleSpellCheckCallback().setNeedsInvocation();
+}
+
DEFINE_WEAK_IDENTIFIER_MAP(LocalFrame);
FrameNavigationDisabler::FrameNavigationDisabler(LocalFrame& frame)

Powered by Google App Engine
This is Rietveld 408576698