| 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 27 matching lines...) Expand all Loading... |
| 38 #include "wtf/text/WTFString.h" | 38 #include "wtf/text/WTFString.h" |
| 39 | 39 |
| 40 namespace blink { | 40 namespace blink { |
| 41 | 41 |
| 42 class LocalFrame; | 42 class LocalFrame; |
| 43 class SpellCheckRequester; | 43 class SpellCheckRequester; |
| 44 class TextCheckerClient; | 44 class TextCheckerClient; |
| 45 | 45 |
| 46 class SpellCheckRequest final : public TextCheckingRequest { | 46 class SpellCheckRequest final : public TextCheckingRequest { |
| 47 public: | 47 public: |
| 48 static SpellCheckRequest* create(TextCheckingTypeMask, TextCheckingProcessTy
pe, const EphemeralRange& checkingRange, const EphemeralRange& paragraphRange, i
nt requestNumber = 0); | 48 static SpellCheckRequest* create(TextCheckingProcessType, const EphemeralRan
ge& checkingRange, const EphemeralRange& paragraphRange, int requestNumber = 0); |
| 49 | 49 |
| 50 ~SpellCheckRequest() override; | 50 ~SpellCheckRequest() override; |
| 51 void dispose(); | 51 void dispose(); |
| 52 | 52 |
| 53 Range* checkingRange() const { return m_checkingRange; } | 53 Range* checkingRange() const { return m_checkingRange; } |
| 54 Range* paragraphRange() const { return m_paragraphRange; } | 54 Range* paragraphRange() const { return m_paragraphRange; } |
| 55 Element* rootEditableElement() const { return m_rootEditableElement; } | 55 Element* rootEditableElement() const { return m_rootEditableElement; } |
| 56 | 56 |
| 57 void setCheckerAndSequence(SpellCheckRequester*, int sequence); | 57 void setCheckerAndSequence(SpellCheckRequester*, int sequence); |
| 58 | 58 |
| 59 const TextCheckingRequestData& data() const override; | 59 const TextCheckingRequestData& data() const override; |
| 60 bool isValid() const; | 60 bool isValid() const; |
| 61 void didSucceed(const Vector<TextCheckingResult>&) override; | 61 void didSucceed(const Vector<TextCheckingResult>&) override; |
| 62 void didCancel() override; | 62 void didCancel() override; |
| 63 | 63 |
| 64 int requestNumber() const { return m_requestNumber; } | 64 int requestNumber() const { return m_requestNumber; } |
| 65 | 65 |
| 66 DECLARE_VIRTUAL_TRACE(); | 66 DECLARE_VIRTUAL_TRACE(); |
| 67 | 67 |
| 68 private: | 68 private: |
| 69 SpellCheckRequest(Range* checkingRange, Range* paragraphRange, const String&
, TextCheckingTypeMask, TextCheckingProcessType, const Vector<uint32_t>& documen
tMarkersInRange, const Vector<unsigned>& documentMarkerOffsets, int requestNumbe
r); | 69 SpellCheckRequest(Range* checkingRange, Range* paragraphRange, const String&
, TextCheckingProcessType, const Vector<uint32_t>& documentMarkersInRange, const
Vector<unsigned>& documentMarkerOffsets, int requestNumber); |
| 70 | 70 |
| 71 Member<SpellCheckRequester> m_requester; | 71 Member<SpellCheckRequester> m_requester; |
| 72 Member<Range> m_checkingRange; | 72 Member<Range> m_checkingRange; |
| 73 Member<Range> m_paragraphRange; | 73 Member<Range> m_paragraphRange; |
| 74 Member<Element> m_rootEditableElement; | 74 Member<Element> m_rootEditableElement; |
| 75 TextCheckingRequestData m_requestData; | 75 TextCheckingRequestData m_requestData; |
| 76 int m_requestNumber; | 76 int m_requestNumber; |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 class SpellCheckRequester final : public GarbageCollectedFinalized<SpellCheckReq
uester> { | 79 class SpellCheckRequester final : public GarbageCollectedFinalized<SpellCheckReq
uester> { |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 | 133 |
| 134 Member<SpellCheckRequest> m_processingRequest; | 134 Member<SpellCheckRequest> m_processingRequest; |
| 135 | 135 |
| 136 typedef HeapDeque<Member<SpellCheckRequest>> RequestQueue; | 136 typedef HeapDeque<Member<SpellCheckRequest>> RequestQueue; |
| 137 RequestQueue m_requestQueue; | 137 RequestQueue m_requestQueue; |
| 138 }; | 138 }; |
| 139 | 139 |
| 140 } // namespace blink | 140 } // namespace blink |
| 141 | 141 |
| 142 #endif // SpellCheckRequester_h | 142 #endif // SpellCheckRequester_h |
| OLD | NEW |