| 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 | 38 |
| 39 namespace WebCore { | 39 namespace WebCore { |
| 40 | 40 |
| 41 class Frame; | 41 class Frame; |
| 42 class Node; | 42 class Node; |
| 43 class SpellCheckRequester; | 43 class SpellCheckRequester; |
| 44 class TextCheckerClient; | 44 class TextCheckerClient; |
| 45 | 45 |
| 46 class SpellCheckRequest : public TextCheckingRequest { | 46 class SpellCheckRequest : public TextCheckingRequest { |
| 47 public: | 47 public: |
| 48 static PassRefPtr<SpellCheckRequest> create(TextCheckingTypeMask, TextChecki
ngProcessType, PassRefPtr<Range> checkingRange, PassRefPtr<Range> paragraphRange
); | 48 static PassRefPtr<SpellCheckRequest> create(TextCheckingTypeMask, TextChecki
ngProcessType, PassRefPtr<Range> checkingRange, PassRefPtr<Range> paragraphRange
, int requestNumber = 0); |
| 49 virtual ~SpellCheckRequest(); | 49 virtual ~SpellCheckRequest(); |
| 50 | 50 |
| 51 PassRefPtr<Range> checkingRange() const { return m_checkingRange; } | 51 PassRefPtr<Range> checkingRange() const { return m_checkingRange; } |
| 52 PassRefPtr<Range> paragraphRange() const { return m_paragraphRange; } | 52 PassRefPtr<Range> paragraphRange() const { return m_paragraphRange; } |
| 53 PassRefPtr<Element> rootEditableElement() const { return m_rootEditableEleme
nt; } | 53 PassRefPtr<Element> rootEditableElement() const { return m_rootEditableEleme
nt; } |
| 54 | 54 |
| 55 void setCheckerAndSequence(SpellCheckRequester*, int sequence); | 55 void setCheckerAndSequence(SpellCheckRequester*, int sequence); |
| 56 void requesterDestroyed(); | 56 void requesterDestroyed(); |
| 57 bool isStarted() const { return m_requester; } | 57 bool isStarted() const { return m_requester; } |
| 58 | 58 |
| 59 virtual const TextCheckingRequestData& data() const OVERRIDE; | 59 virtual const TextCheckingRequestData& data() const OVERRIDE; |
| 60 virtual void didSucceed(const Vector<TextCheckingResult>&) OVERRIDE; | 60 virtual void didSucceed(const Vector<TextCheckingResult>&) OVERRIDE; |
| 61 virtual void didCancel() OVERRIDE; | 61 virtual void didCancel() OVERRIDE; |
| 62 | 62 |
| 63 int requestNumber() const { return m_requestNumber; } |
| 64 |
| 63 private: | 65 private: |
| 64 SpellCheckRequest(PassRefPtr<Range> checkingRange, PassRefPtr<Range> paragra
phRange, const String&, TextCheckingTypeMask, TextCheckingProcessType, const Vec
tor<uint32_t>& documentMarkersInRange, const Vector<unsigned>& documentMarkerOff
sets); | 66 SpellCheckRequest(PassRefPtr<Range> checkingRange, PassRefPtr<Range> paragra
phRange, const String&, TextCheckingTypeMask, TextCheckingProcessType, const Vec
tor<uint32_t>& documentMarkersInRange, const Vector<unsigned>& documentMarkerOff
sets, int requestNumber); |
| 65 | 67 |
| 66 SpellCheckRequester* m_requester; | 68 SpellCheckRequester* m_requester; |
| 67 RefPtr<Range> m_checkingRange; | 69 RefPtr<Range> m_checkingRange; |
| 68 RefPtr<Range> m_paragraphRange; | 70 RefPtr<Range> m_paragraphRange; |
| 69 RefPtr<Element> m_rootEditableElement; | 71 RefPtr<Element> m_rootEditableElement; |
| 70 TextCheckingRequestData m_requestData; | 72 TextCheckingRequestData m_requestData; |
| 73 int m_requestNumber; |
| 71 }; | 74 }; |
| 72 | 75 |
| 73 class SpellCheckRequester { | 76 class SpellCheckRequester { |
| 74 WTF_MAKE_NONCOPYABLE(SpellCheckRequester); WTF_MAKE_FAST_ALLOCATED; | 77 WTF_MAKE_NONCOPYABLE(SpellCheckRequester); WTF_MAKE_FAST_ALLOCATED; |
| 75 public: | 78 public: |
| 76 friend class SpellCheckRequest; | 79 friend class SpellCheckRequest; |
| 77 | 80 |
| 78 explicit SpellCheckRequester(Frame*); | 81 explicit SpellCheckRequester(Frame*); |
| 79 ~SpellCheckRequester(); | 82 ~SpellCheckRequester(); |
| 80 | 83 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 | 115 |
| 113 Timer<SpellCheckRequester> m_timerToProcessQueuedRequest; | 116 Timer<SpellCheckRequester> m_timerToProcessQueuedRequest; |
| 114 | 117 |
| 115 RefPtr<SpellCheckRequest> m_processingRequest; | 118 RefPtr<SpellCheckRequest> m_processingRequest; |
| 116 RequestQueue m_requestQueue; | 119 RequestQueue m_requestQueue; |
| 117 }; | 120 }; |
| 118 | 121 |
| 119 } // namespace WebCore | 122 } // namespace WebCore |
| 120 | 123 |
| 121 #endif // SpellCheckRequester_h | 124 #endif // SpellCheckRequester_h |
| OLD | NEW |