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

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

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.h
diff --git a/third_party/WebKit/Source/core/editing/spellcheck/IdleSpellCheckCallback.h b/third_party/WebKit/Source/core/editing/spellcheck/IdleSpellCheckCallback.h
index c54d2bc2db0be293c9b63899cd8d618c94f4cc08..7ebd98eeba59a827f67e1e9374565ceaaf5c75ff 100644
--- a/third_party/WebKit/Source/core/editing/spellcheck/IdleSpellCheckCallback.h
+++ b/third_party/WebKit/Source/core/editing/spellcheck/IdleSpellCheckCallback.h
@@ -6,13 +6,15 @@
#define IdleSpellCheckCallback_h
#include "core/dom/IdleRequestCallback.h"
-#include "core/frame/LocalFrame.h"
#include "platform/Timer.h"
namespace blink {
+class LocalFrame;
+class SpellCheckRequester;
+
// Main class for the implementation of idle time spell checker.
-class IdleSpellCheckCallback final : public IdleRequestCallback {
+class CORE_EXPORT IdleSpellCheckCallback final : public IdleRequestCallback {
public:
static IdleSpellCheckCallback* create(LocalFrame&);
~IdleSpellCheckCallback() override;
@@ -32,6 +34,17 @@ class IdleSpellCheckCallback final : public IdleRequestCallback {
// TODO(xiaochengh): Add proper call sites.
void deactivate();
+ // Exposed for testing only.
+ SpellCheckRequester& spellCheckRequester() const;
+
+ // The leak detector will report leaks should queued requests be posted
+ // while it GCs repeatedly, as the requests keep their associated element
+ // alive.
+ //
+ // Hence allow the leak detector to effectively stop the spell checker to
+ // ensure leak reporting stability.
+ void prepareForLeakDetection();
+
DECLARE_VIRTUAL_TRACE();
private:

Powered by Google App Engine
This is Rietveld 408576698