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 24 matching lines...) Expand all Loading... |
35 #include "wtf/RefPtr.h" | 35 #include "wtf/RefPtr.h" |
36 #include "wtf/Vector.h" | 36 #include "wtf/Vector.h" |
37 #include "wtf/text/WTFString.h" | 37 #include "wtf/text/WTFString.h" |
38 | 38 |
39 namespace blink { | 39 namespace blink { |
40 | 40 |
41 class LocalFrame; | 41 class LocalFrame; |
42 class SpellCheckRequester; | 42 class SpellCheckRequester; |
43 class TextCheckerClient; | 43 class TextCheckerClient; |
44 | 44 |
45 class SpellCheckRequest FINAL : public TextCheckingRequest { | 45 class SpellCheckRequest final : public TextCheckingRequest { |
46 public: | 46 public: |
47 static PassRefPtrWillBeRawPtr<SpellCheckRequest> create(TextCheckingTypeMask
, TextCheckingProcessType, PassRefPtrWillBeRawPtr<Range> checkingRange, PassRefP
trWillBeRawPtr<Range> paragraphRange, int requestNumber = 0); | 47 static PassRefPtrWillBeRawPtr<SpellCheckRequest> create(TextCheckingTypeMask
, TextCheckingProcessType, PassRefPtrWillBeRawPtr<Range> checkingRange, PassRefP
trWillBeRawPtr<Range> paragraphRange, int requestNumber = 0); |
48 virtual ~SpellCheckRequest(); | 48 virtual ~SpellCheckRequest(); |
49 | 49 |
50 PassRefPtrWillBeRawPtr<Range> checkingRange() const { return m_checkingRange
; } | 50 PassRefPtrWillBeRawPtr<Range> checkingRange() const { return m_checkingRange
; } |
51 PassRefPtrWillBeRawPtr<Range> paragraphRange() const { return m_paragraphRan
ge; } | 51 PassRefPtrWillBeRawPtr<Range> paragraphRange() const { return m_paragraphRan
ge; } |
52 PassRefPtrWillBeRawPtr<Element> rootEditableElement() const { return m_rootE
ditableElement; } | 52 PassRefPtrWillBeRawPtr<Element> rootEditableElement() const { return m_rootE
ditableElement; } |
53 | 53 |
54 void setCheckerAndSequence(SpellCheckRequester*, int sequence); | 54 void setCheckerAndSequence(SpellCheckRequester*, int sequence); |
55 #if !ENABLE(OILPAN) | 55 #if !ENABLE(OILPAN) |
56 void requesterDestroyed(); | 56 void requesterDestroyed(); |
57 #endif | 57 #endif |
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; } | 63 int requestNumber() const { return m_requestNumber; } |
64 | 64 |
65 virtual void trace(Visitor*) OVERRIDE; | 65 virtual void trace(Visitor*) override; |
66 | 66 |
67 private: | 67 private: |
68 SpellCheckRequest(PassRefPtrWillBeRawPtr<Range> checkingRange, PassRefPtrWil
lBeRawPtr<Range> paragraphRange, const String&, TextCheckingTypeMask, TextChecki
ngProcessType, const Vector<uint32_t>& documentMarkersInRange, const Vector<unsi
gned>& documentMarkerOffsets, int requestNumber); | 68 SpellCheckRequest(PassRefPtrWillBeRawPtr<Range> checkingRange, PassRefPtrWil
lBeRawPtr<Range> paragraphRange, const String&, TextCheckingTypeMask, TextChecki
ngProcessType, const Vector<uint32_t>& documentMarkersInRange, const Vector<unsi
gned>& documentMarkerOffsets, int requestNumber); |
69 | 69 |
70 RawPtrWillBeMember<SpellCheckRequester> m_requester; | 70 RawPtrWillBeMember<SpellCheckRequester> m_requester; |
71 RefPtrWillBeMember<Range> m_checkingRange; | 71 RefPtrWillBeMember<Range> m_checkingRange; |
72 RefPtrWillBeMember<Range> m_paragraphRange; | 72 RefPtrWillBeMember<Range> m_paragraphRange; |
73 RefPtrWillBeMember<Element> m_rootEditableElement; | 73 RefPtrWillBeMember<Element> m_rootEditableElement; |
74 TextCheckingRequestData m_requestData; | 74 TextCheckingRequestData m_requestData; |
75 int m_requestNumber; | 75 int m_requestNumber; |
76 }; | 76 }; |
77 | 77 |
78 class SpellCheckRequester FINAL : public NoBaseWillBeGarbageCollectedFinalized<S
pellCheckRequester> { | 78 class SpellCheckRequester final : public NoBaseWillBeGarbageCollectedFinalized<S
pellCheckRequester> { |
79 WTF_MAKE_NONCOPYABLE(SpellCheckRequester); WTF_MAKE_FAST_ALLOCATED_WILL_BE_R
EMOVED; | 79 WTF_MAKE_NONCOPYABLE(SpellCheckRequester); WTF_MAKE_FAST_ALLOCATED_WILL_BE_R
EMOVED; |
80 public: | 80 public: |
81 static PassOwnPtrWillBeRawPtr<SpellCheckRequester> create(LocalFrame& frame) | 81 static PassOwnPtrWillBeRawPtr<SpellCheckRequester> create(LocalFrame& frame) |
82 { | 82 { |
83 return adoptPtrWillBeNoop(new SpellCheckRequester(frame)); | 83 return adoptPtrWillBeNoop(new SpellCheckRequester(frame)); |
84 } | 84 } |
85 | 85 |
86 ~SpellCheckRequester(); | 86 ~SpellCheckRequester(); |
87 void trace(Visitor*); | 87 void trace(Visitor*); |
88 | 88 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 | 130 |
131 RefPtrWillBeMember<SpellCheckRequest> m_processingRequest; | 131 RefPtrWillBeMember<SpellCheckRequest> m_processingRequest; |
132 | 132 |
133 typedef WillBeHeapDeque<RefPtrWillBeMember<SpellCheckRequest> > RequestQueue
; | 133 typedef WillBeHeapDeque<RefPtrWillBeMember<SpellCheckRequest> > RequestQueue
; |
134 RequestQueue m_requestQueue; | 134 RequestQueue m_requestQueue; |
135 }; | 135 }; |
136 | 136 |
137 } // namespace blink | 137 } // namespace blink |
138 | 138 |
139 #endif // SpellCheckRequester_h | 139 #endif // SpellCheckRequester_h |
OLD | NEW |