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

Side by Side Diff: third_party/WebKit/Source/web/SpellCheckerClientImpl.cpp

Issue 2226833003: Make WebSpellCheckClient aware of leak detection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@SpellCheckerDebugInfo
Patch Set: Minor style fix Created 4 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) 2006, 2007 Apple, Inc. All rights reserved. 2 * Copyright (C) 2006, 2007 Apple, Inc. All rights reserved.
3 * Copyright (C) 2012 Google, Inc. All rights reserved. 3 * Copyright (C) 2012 Google, Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 void SpellCheckerClientImpl::requestCheckingOfString(TextCheckingRequest* reques t) 140 void SpellCheckerClientImpl::requestCheckingOfString(TextCheckingRequest* reques t)
141 { 141 {
142 if (!m_webView->spellCheckClient()) 142 if (!m_webView->spellCheckClient())
143 return; 143 return;
144 const String& text = request->data().text(); 144 const String& text = request->data().text();
145 const Vector<uint32_t>& markers = request->data().markers(); 145 const Vector<uint32_t>& markers = request->data().markers();
146 const Vector<unsigned>& markerOffsets = request->data().offsets(); 146 const Vector<unsigned>& markerOffsets = request->data().offsets();
147 m_webView->spellCheckClient()->requestCheckingOfText(text, markers, markerOf fsets, new WebTextCheckingCompletionImpl(request)); 147 m_webView->spellCheckClient()->requestCheckingOfText(text, markers, markerOf fsets, new WebTextCheckingCompletionImpl(request));
148 } 148 }
149 149
150 void SpellCheckerClientImpl::cancelAllPendingRequests()
151 {
152 if (!m_webView->spellCheckClient())
153 return;
154 m_webView->spellCheckClient()->cancelAllPendingRequests();
155 }
156
150 void SpellCheckerClientImpl::checkGrammarOfString(const String& text, WTF::Vecto r<GrammarDetail>& details, int* badGrammarLocation, int* badGrammarLength) 157 void SpellCheckerClientImpl::checkGrammarOfString(const String& text, WTF::Vecto r<GrammarDetail>& details, int* badGrammarLocation, int* badGrammarLength)
151 { 158 {
152 if (badGrammarLocation) 159 if (badGrammarLocation)
153 *badGrammarLocation = -1; 160 *badGrammarLocation = -1;
154 if (badGrammarLength) 161 if (badGrammarLength)
155 *badGrammarLength = 0; 162 *badGrammarLength = 0;
156 163
157 if (!m_webView->spellCheckClient()) 164 if (!m_webView->spellCheckClient())
158 return; 165 return;
159 WebVector<WebTextCheckingResult> webResults; 166 WebVector<WebTextCheckingResult> webResults;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 } 202 }
196 203
197 bool SpellCheckerClientImpl::spellingUIIsShowing() 204 bool SpellCheckerClientImpl::spellingUIIsShowing()
198 { 205 {
199 if (m_webView->spellCheckClient()) 206 if (m_webView->spellCheckClient())
200 return m_webView->spellCheckClient()->isShowingSpellingUI(); 207 return m_webView->spellCheckClient()->isShowingSpellingUI();
201 return false; 208 return false;
202 } 209 }
203 210
204 } // namespace blink 211 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/SpellCheckerClientImpl.h ('k') | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698