Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: Source/core/editing/SpellChecker.cpp

Issue 21024004: Add/remove spell checking markers in text inputs depending on focus. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 } 190 }
191 191
192 void SpellChecker::cancelCheck() 192 void SpellChecker::cancelCheck()
193 { 193 {
194 if (!m_requestQueue.isEmpty()) 194 if (!m_requestQueue.isEmpty())
195 m_requestQueue.clear(); 195 m_requestQueue.clear();
196 if (m_processingRequest) 196 if (m_processingRequest)
197 m_processingRequest->didCancel(); 197 m_processingRequest->didCancel();
198 } 198 }
199 199
200 void SpellChecker::cancelProcessingRequest()
201 {
202 if (m_processingRequest)
203 m_processingRequest->didCancel();
204 }
205
200 void SpellChecker::invokeRequest(PassRefPtr<SpellCheckRequest> request) 206 void SpellChecker::invokeRequest(PassRefPtr<SpellCheckRequest> request)
201 { 207 {
202 ASSERT(!m_processingRequest); 208 ASSERT(!m_processingRequest);
203 if (!client()) 209 if (!client())
204 return; 210 return;
205 m_processingRequest = request; 211 m_processingRequest = request;
206 client()->requestCheckingOfString(m_processingRequest); 212 client()->requestCheckingOfString(m_processingRequest);
207 } 213 }
208 214
209 void SpellChecker::enqueueRequest(PassRefPtr<SpellCheckRequest> request) 215 void SpellChecker::enqueueRequest(PassRefPtr<SpellCheckRequest> request)
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 didCheck(sequence, results); 261 didCheck(sequence, results);
256 } 262 }
257 263
258 void SpellChecker::didCheckCancel(int sequence) 264 void SpellChecker::didCheckCancel(int sequence)
259 { 265 {
260 Vector<TextCheckingResult> results; 266 Vector<TextCheckingResult> results;
261 didCheck(sequence, results); 267 didCheck(sequence, results);
262 } 268 }
263 269
264 } // namespace WebCore 270 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698