| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google 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 10 matching lines...) Expand all Loading... |
| 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #ifndef SpellCheckRequester_h | 26 #ifndef SpellCheckRequester_h |
| 27 #define SpellCheckRequester_h | 27 #define SpellCheckRequester_h |
| 28 | 28 |
| 29 #include "core/dom/Element.h" | 29 #include "core/dom/Element.h" |
| 30 #include "core/dom/Range.h" | 30 #include "core/dom/Range.h" |
| 31 #include "core/editing/EphemeralRange.h" |
| 31 #include "platform/Timer.h" | 32 #include "platform/Timer.h" |
| 32 #include "platform/text/TextChecking.h" | 33 #include "platform/text/TextChecking.h" |
| 33 #include "wtf/Deque.h" | 34 #include "wtf/Deque.h" |
| 34 #include "wtf/Noncopyable.h" | 35 #include "wtf/Noncopyable.h" |
| 35 #include "wtf/RefPtr.h" | 36 #include "wtf/RefPtr.h" |
| 36 #include "wtf/Vector.h" | 37 #include "wtf/Vector.h" |
| 37 #include "wtf/text/WTFString.h" | 38 #include "wtf/text/WTFString.h" |
| 38 | 39 |
| 39 namespace blink { | 40 namespace blink { |
| 40 | 41 |
| 41 class LocalFrame; | 42 class LocalFrame; |
| 42 class SpellCheckRequester; | 43 class SpellCheckRequester; |
| 43 class TextCheckerClient; | 44 class TextCheckerClient; |
| 44 | 45 |
| 45 class SpellCheckRequest final : public TextCheckingRequest { | 46 class SpellCheckRequest final : public TextCheckingRequest { |
| 46 public: | 47 public: |
| 47 static PassRefPtrWillBeRawPtr<SpellCheckRequest> create(TextCheckingTypeMask
, TextCheckingProcessType, PassRefPtrWillBeRawPtr<Range> checkingRange, PassRefP
trWillBeRawPtr<Range> paragraphRange, int requestNumber = 0); | 48 static PassRefPtrWillBeRawPtr<SpellCheckRequest> create(TextCheckingTypeMask
, TextCheckingProcessType, const EphemeralRange& checkingRange, const EphemeralR
ange& paragraphRange, int requestNumber = 0); |
| 49 |
| 48 ~SpellCheckRequest() override; | 50 ~SpellCheckRequest() override; |
| 51 void dispose(); |
| 49 | 52 |
| 50 PassRefPtrWillBeRawPtr<Range> checkingRange() const { return m_checkingRange
; } | 53 PassRefPtrWillBeRawPtr<Range> checkingRange() const { return m_checkingRange
; } |
| 51 PassRefPtrWillBeRawPtr<Range> paragraphRange() const { return m_paragraphRan
ge; } | 54 PassRefPtrWillBeRawPtr<Range> paragraphRange() const { return m_paragraphRan
ge; } |
| 52 PassRefPtrWillBeRawPtr<Element> rootEditableElement() const { return m_rootE
ditableElement; } | 55 PassRefPtrWillBeRawPtr<Element> rootEditableElement() const { return m_rootE
ditableElement; } |
| 53 | 56 |
| 54 void setCheckerAndSequence(SpellCheckRequester*, int sequence); | 57 void setCheckerAndSequence(SpellCheckRequester*, int sequence); |
| 55 #if !ENABLE(OILPAN) | 58 #if !ENABLE(OILPAN) |
| 56 void requesterDestroyed(); | 59 void requesterDestroyed(); |
| 57 #endif | 60 #endif |
| 58 | 61 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 | 135 |
| 133 RefPtrWillBeMember<SpellCheckRequest> m_processingRequest; | 136 RefPtrWillBeMember<SpellCheckRequest> m_processingRequest; |
| 134 | 137 |
| 135 typedef WillBeHeapDeque<RefPtrWillBeMember<SpellCheckRequest>> RequestQueue; | 138 typedef WillBeHeapDeque<RefPtrWillBeMember<SpellCheckRequest>> RequestQueue; |
| 136 RequestQueue m_requestQueue; | 139 RequestQueue m_requestQueue; |
| 137 }; | 140 }; |
| 138 | 141 |
| 139 } // namespace blink | 142 } // namespace blink |
| 140 | 143 |
| 141 #endif // SpellCheckRequester_h | 144 #endif // SpellCheckRequester_h |
| OLD | NEW |