| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 // Exposed for leak detector only, see comment for corresponding | 103 // Exposed for leak detector only, see comment for corresponding |
| 104 // SpellChecker method. | 104 // SpellChecker method. |
| 105 void prepareForLeakDetection(); | 105 void prepareForLeakDetection(); |
| 106 | 106 |
| 107 private: | 107 private: |
| 108 friend class SpellCheckRequest; | 108 friend class SpellCheckRequest; |
| 109 | 109 |
| 110 explicit SpellCheckRequester(LocalFrame&); | 110 explicit SpellCheckRequester(LocalFrame&); |
| 111 | 111 |
| 112 TextCheckerClient& client() const; | 112 TextCheckerClient& client() const; |
| 113 void timerFiredToProcessQueuedRequest(Timer<SpellCheckRequester>*); | 113 void timerFiredToProcessQueuedRequest(TimerBase*); |
| 114 void invokeRequest(SpellCheckRequest*); | 114 void invokeRequest(SpellCheckRequest*); |
| 115 void enqueueRequest(SpellCheckRequest*); | 115 void enqueueRequest(SpellCheckRequest*); |
| 116 void didCheckSucceed(int sequence, const Vector<TextCheckingResult>&); | 116 void didCheckSucceed(int sequence, const Vector<TextCheckingResult>&); |
| 117 void didCheckCancel(int sequence); | 117 void didCheckCancel(int sequence); |
| 118 void didCheck(int sequence, const Vector<TextCheckingResult>&); | 118 void didCheck(int sequence, const Vector<TextCheckingResult>&); |
| 119 | 119 |
| 120 void clearProcessingRequest(); | 120 void clearProcessingRequest(); |
| 121 | 121 |
| 122 Member<LocalFrame> m_frame; | 122 Member<LocalFrame> m_frame; |
| 123 LocalFrame& frame() const | 123 LocalFrame& frame() const |
| 124 { | 124 { |
| 125 DCHECK(m_frame); | 125 DCHECK(m_frame); |
| 126 return *m_frame; | 126 return *m_frame; |
| 127 } | 127 } |
| 128 | 128 |
| 129 int m_lastRequestSequence; | 129 int m_lastRequestSequence; |
| 130 int m_lastProcessedSequence; | 130 int m_lastProcessedSequence; |
| 131 | 131 |
| 132 Timer<SpellCheckRequester> m_timerToProcessQueuedRequest; | 132 Timer<SpellCheckRequester> m_timerToProcessQueuedRequest; |
| 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 |