| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/renderer/spellchecker/spellcheck.h" | 5 #include "chrome/renderer/spellchecker/spellcheck.h" |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "base/time.h" | 9 #include "base/time.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 | 279 |
| 280 string16 word; | 280 string16 word; |
| 281 int word_start; | 281 int word_start; |
| 282 int word_length; | 282 int word_length; |
| 283 while (word_iterator.GetNextWord(&word, &word_start, &word_length)) { | 283 while (word_iterator.GetNextWord(&word, &word_start, &word_length)) { |
| 284 if (!CheckSpelling(word, tag)) | 284 if (!CheckSpelling(word, tag)) |
| 285 return false; | 285 return false; |
| 286 } | 286 } |
| 287 return true; | 287 return true; |
| 288 } | 288 } |
| 289 |
| 290 bool SpellCheck::RequestCheckingOfText( |
| 291 int32 routing_id, const string16& text, int tag, int request_id) { |
| 292 if (!is_using_platform_spelling_engine_) |
| 293 return false; |
| 294 |
| 295 RenderThread::current()->Send( |
| 296 new ViewHostMsg_SpellChecker_PlatformRequestTextCheck( |
| 297 routing_id, request_id, tag, text)); |
| 298 return true; |
| 299 } |
| OLD | NEW |