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