| OLD | NEW |
| 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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() | 150 void SpellCheckerClientImpl::cancelAllPendingRequests() |
| 151 { | 151 { |
| 152 if (!m_webView->spellCheckClient()) | 152 if (!m_webView->spellCheckClient()) |
| 153 return; | 153 return; |
| 154 m_webView->spellCheckClient()->cancelAllPendingRequests(); | 154 m_webView->spellCheckClient()->cancelAllPendingRequests(); |
| 155 } | 155 } |
| 156 | 156 |
| 157 void SpellCheckerClientImpl::checkGrammarOfString(const String& text, WTF::Vecto
r<GrammarDetail>& details, int* badGrammarLocation, int* badGrammarLength) | |
| 158 { | |
| 159 if (badGrammarLocation) | |
| 160 *badGrammarLocation = -1; | |
| 161 if (badGrammarLength) | |
| 162 *badGrammarLength = 0; | |
| 163 return; | |
| 164 } | |
| 165 | |
| 166 void SpellCheckerClientImpl::updateSpellingUIWithMisspelledWord(const String& mi
sspelledWord) | 157 void SpellCheckerClientImpl::updateSpellingUIWithMisspelledWord(const String& mi
sspelledWord) |
| 167 { | 158 { |
| 168 if (m_webView->spellCheckClient()) | 159 if (m_webView->spellCheckClient()) |
| 169 m_webView->spellCheckClient()->updateSpellingUIWithMisspelledWord(WebStr
ing(misspelledWord)); | 160 m_webView->spellCheckClient()->updateSpellingUIWithMisspelledWord(WebStr
ing(misspelledWord)); |
| 170 } | 161 } |
| 171 | 162 |
| 172 void SpellCheckerClientImpl::showSpellingUI(bool show) | 163 void SpellCheckerClientImpl::showSpellingUI(bool show) |
| 173 { | 164 { |
| 174 if (m_webView->spellCheckClient()) | 165 if (m_webView->spellCheckClient()) |
| 175 m_webView->spellCheckClient()->showSpellingUI(show); | 166 m_webView->spellCheckClient()->showSpellingUI(show); |
| 176 } | 167 } |
| 177 | 168 |
| 178 bool SpellCheckerClientImpl::spellingUIIsShowing() | 169 bool SpellCheckerClientImpl::spellingUIIsShowing() |
| 179 { | 170 { |
| 180 if (m_webView->spellCheckClient()) | 171 if (m_webView->spellCheckClient()) |
| 181 return m_webView->spellCheckClient()->isShowingSpellingUI(); | 172 return m_webView->spellCheckClient()->isShowingSpellingUI(); |
| 182 return false; | 173 return false; |
| 183 } | 174 } |
| 184 | 175 |
| 185 } // namespace blink | 176 } // namespace blink |
| OLD | NEW |