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

Unified Diff: Source/core/editing/SpellChecker.h

Issue 517043003: Move Frame to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Experiment: also clear FrameView and FrameLoader during owner disconnect for non-Oilpan Created 6 years, 3 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
« no previous file with comments | « Source/core/editing/SpellCheckRequester.cpp ('k') | Source/core/editing/SpellChecker.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/SpellChecker.h
diff --git a/Source/core/editing/SpellChecker.h b/Source/core/editing/SpellChecker.h
index a250396a34f91a0ff12f6a9ee6362874ebc6738d..a4a36473cdcb820449d1717c4b8a32f55fde3b91 100644
--- a/Source/core/editing/SpellChecker.h
+++ b/Source/core/editing/SpellChecker.h
@@ -29,6 +29,7 @@
#include "core/dom/DocumentMarker.h"
#include "core/editing/FrameSelection.h"
#include "core/editing/VisibleSelection.h"
+#include "platform/heap/Handle.h"
#include "platform/text/TextChecking.h"
namespace blink {
@@ -41,12 +42,13 @@ class TextCheckerClient;
class TextCheckingParagraph;
struct TextCheckingResult;
-class SpellChecker {
+class SpellChecker FINAL : public NoBaseWillBeGarbageCollectedFinalized<SpellChecker> {
WTF_MAKE_NONCOPYABLE(SpellChecker);
public:
- static PassOwnPtr<SpellChecker> create(LocalFrame&);
+ static PassOwnPtrWillBeRawPtr<SpellChecker> create(LocalFrame&);
~SpellChecker();
+ void trace(Visitor*);
SpellCheckerClient& spellCheckerClient() const;
TextCheckerClient& textChecker() const;
@@ -62,7 +64,7 @@ public:
void markMisspellings(const VisibleSelection&, RefPtrWillBeRawPtr<Range>& firstMisspellingRange);
void markBadGrammar(const VisibleSelection&);
void markMisspellingsAndBadGrammar(const VisibleSelection& spellingSelection, bool markGrammar, const VisibleSelection& grammarSelection);
- void markAndReplaceFor(PassRefPtr<SpellCheckRequest>, const Vector<TextCheckingResult>&);
+ void markAndReplaceFor(PassRefPtrWillBeRawPtr<SpellCheckRequest>, const Vector<TextCheckingResult>&);
void markAllMisspellingsAndBadGrammarInRanges(TextCheckingTypeMask, Range* spellingRange, Range* grammarRange);
void advanceToNextMisspelling(bool startBeforeSelection = false);
void showSpellingGuessPanel();
@@ -88,9 +90,6 @@ public:
SpellCheckRequester& spellCheckRequester() const { return *m_spellCheckRequester; }
private:
- LocalFrame& m_frame;
- const OwnPtr<SpellCheckRequester> m_spellCheckRequester;
-
explicit SpellChecker(LocalFrame&);
void markMisspellingsOrBadGrammar(const VisibleSelection&, bool checkSpelling, RefPtrWillBeRawPtr<Range>& firstMisspellingRange);
@@ -100,6 +99,9 @@ private:
void chunkAndMarkAllMisspellingsAndBadGrammar(TextCheckingTypeMask textCheckingOptions, const TextCheckingParagraph& fullParagraphToCheck, bool asynchronous);
void markAllMisspellingsAndBadGrammarInRanges(TextCheckingTypeMask textCheckingOptions, Range* checkingRange, Range* paragraphRange, bool asynchronous, int requestNumber, int* checkingLength = 0);
+
+ RawPtrWillBeMember<LocalFrame> m_frame;
+ const OwnPtrWillBeMember<SpellCheckRequester> m_spellCheckRequester;
};
} // namespace blink
« no previous file with comments | « Source/core/editing/SpellCheckRequester.cpp ('k') | Source/core/editing/SpellChecker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698