| 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 *misspellingLocation = spellLocation; | 135 *misspellingLocation = spellLocation; |
| 136 if (misspellingLength) | 136 if (misspellingLength) |
| 137 *misspellingLength = spellLength; | 137 *misspellingLength = spellLength; |
| 138 } | 138 } |
| 139 | 139 |
| 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 m_webView->spellCheckClient()->requestCheckingOfText(text, new WebTextChecki
ngCompletionImpl(request)); |
| 146 const Vector<unsigned>& markerOffsets = request->data().offsets(); | |
| 147 m_webView->spellCheckClient()->requestCheckingOfText(text, markers, markerOf
fsets, new WebTextCheckingCompletionImpl(request)); | |
| 148 } | 146 } |
| 149 | 147 |
| 150 void SpellCheckerClientImpl::updateSpellingUIWithMisspelledWord(const String& mi
sspelledWord) | 148 void SpellCheckerClientImpl::updateSpellingUIWithMisspelledWord(const String& mi
sspelledWord) |
| 151 { | 149 { |
| 152 if (m_webView->spellCheckClient()) | 150 if (m_webView->spellCheckClient()) |
| 153 m_webView->spellCheckClient()->updateSpellingUIWithMisspelledWord(WebStr
ing(misspelledWord)); | 151 m_webView->spellCheckClient()->updateSpellingUIWithMisspelledWord(WebStr
ing(misspelledWord)); |
| 154 } | 152 } |
| 155 | 153 |
| 156 void SpellCheckerClientImpl::showSpellingUI(bool show) | 154 void SpellCheckerClientImpl::showSpellingUI(bool show) |
| 157 { | 155 { |
| 158 if (m_webView->spellCheckClient()) | 156 if (m_webView->spellCheckClient()) |
| 159 m_webView->spellCheckClient()->showSpellingUI(show); | 157 m_webView->spellCheckClient()->showSpellingUI(show); |
| 160 } | 158 } |
| 161 | 159 |
| 162 bool SpellCheckerClientImpl::spellingUIIsShowing() | 160 bool SpellCheckerClientImpl::spellingUIIsShowing() |
| 163 { | 161 { |
| 164 if (m_webView->spellCheckClient()) | 162 if (m_webView->spellCheckClient()) |
| 165 return m_webView->spellCheckClient()->isShowingSpellingUI(); | 163 return m_webView->spellCheckClient()->isShowingSpellingUI(); |
| 166 return false; | 164 return false; |
| 167 } | 165 } |
| 168 | 166 |
| 169 } // namespace blink | 167 } // namespace blink |
| OLD | NEW |