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

Side by Side Diff: third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.h

Issue 2220493002: Code cleanup in blink::SpellChecker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 bool isContinuousSpellCheckingEnabled() const; 56 bool isContinuousSpellCheckingEnabled() const;
57 void toggleContinuousSpellChecking(); 57 void toggleContinuousSpellChecking();
58 void ignoreSpelling(); 58 void ignoreSpelling();
59 bool isSpellCheckingEnabledInFocusedNode() const; 59 bool isSpellCheckingEnabledInFocusedNode() const;
60 bool isSpellCheckingEnabledFor(Node*) const; 60 bool isSpellCheckingEnabledFor(Node*) const;
61 static bool isSpellCheckingEnabledFor(const VisibleSelection&); 61 static bool isSpellCheckingEnabledFor(const VisibleSelection&);
62 void markMisspellingsAfterLineBreak(const VisibleSelection& wordSelection); 62 void markMisspellingsAfterLineBreak(const VisibleSelection& wordSelection);
63 void markMisspellingsAfterTypingToWord(const VisiblePosition &wordStart, con st VisibleSelection& selectionAfterTyping); 63 void markMisspellingsAfterTypingToWord(const VisiblePosition &wordStart, con st VisibleSelection& selectionAfterTyping);
64 bool markMisspellings(const VisibleSelection&); 64 bool markMisspellings(const VisibleSelection&);
65 void markBadGrammar(const VisibleSelection&); 65 void markBadGrammar(const VisibleSelection&);
66 void markMisspellingsAndBadGrammar(const VisibleSelection& spellingSelection , bool markGrammar, const VisibleSelection& grammarSelection); 66 void markMisspellingsAndBadGrammar(const VisibleSelection& spellingSelection , const VisibleSelection& grammarSelection);
67 void markAndReplaceFor(SpellCheckRequest*, const Vector<TextCheckingResult>& ); 67 void markAndReplaceFor(SpellCheckRequest*, const Vector<TextCheckingResult>& );
68 void markAllMisspellingsAndBadGrammarInRanges(TextCheckingTypeMask, const Ep hemeralRange& spellingRange, const EphemeralRange& grammarRange); 68 void markAllMisspellingsAndBadGrammarInRanges(const EphemeralRange& spelling Range, const EphemeralRange& grammarRange);
69 void advanceToNextMisspelling(bool startBeforeSelection = false); 69 void advanceToNextMisspelling(bool startBeforeSelection = false);
70 void showSpellingGuessPanel(); 70 void showSpellingGuessPanel();
71 void didBeginEditing(Element*); 71 void didBeginEditing(Element*);
72 void clearMisspellingsAndBadGrammar(const VisibleSelection&); 72 void clearMisspellingsAndBadGrammar(const VisibleSelection&);
73 void markMisspellingsAndBadGrammar(const VisibleSelection&); 73 void markMisspellingsAndBadGrammar(const VisibleSelection&);
74 void respondToChangedSelection(const VisibleSelection& oldSelection, FrameSe lection::SetSelectionOptions); 74 void respondToChangedSelection(const VisibleSelection& oldSelection, FrameSe lection::SetSelectionOptions);
75 void replaceMisspelledRange(const String&); 75 void replaceMisspelledRange(const String&);
76 void removeSpellingMarkers(); 76 void removeSpellingMarkers();
77 void removeSpellingMarkersUnderWords(const Vector<String>& words); 77 void removeSpellingMarkersUnderWords(const Vector<String>& words);
78 void spellCheckAfterBlur(); 78 void spellCheckAfterBlur();
(...skipping 21 matching lines...) Expand all
100 private: 100 private:
101 explicit SpellChecker(LocalFrame&); 101 explicit SpellChecker(LocalFrame&);
102 102
103 LocalFrame& frame() const 103 LocalFrame& frame() const
104 { 104 {
105 DCHECK(m_frame); 105 DCHECK(m_frame);
106 return *m_frame; 106 return *m_frame;
107 } 107 }
108 108
109 bool markMisspellingsOrBadGrammar(const VisibleSelection&, bool checkSpellin g); 109 bool markMisspellingsOrBadGrammar(const VisibleSelection&, bool checkSpellin g);
110 TextCheckingTypeMask resolveTextCheckingTypeMask(TextCheckingTypeMask);
111 110
112 void removeMarkers(const VisibleSelection&, DocumentMarker::MarkerTypes); 111 void removeMarkers(const VisibleSelection&, DocumentMarker::MarkerTypes);
113 bool unifiedTextCheckerEnabled() const; 112 bool unifiedTextCheckerEnabled() const;
114 113
115 void chunkAndMarkAllMisspellingsAndBadGrammar(TextCheckingTypeMask textCheck ingOptions, const TextCheckingParagraph& fullParagraphToCheck); 114 void chunkAndMarkAllMisspellingsAndBadGrammar(const TextCheckingParagraph& f ullParagraphToCheck);
116 115
117 Member<LocalFrame> m_frame; 116 Member<LocalFrame> m_frame;
118 const Member<SpellCheckRequester> m_spellCheckRequester; 117 const Member<SpellCheckRequester> m_spellCheckRequester;
119 }; 118 };
120 119
121 } // namespace blink 120 } // namespace blink
122 121
123 #endif // SpellChecker_h 122 #endif // SpellChecker_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698