OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/bind.h" | 7 #include "base/bind.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/message_loop_proxy.h" | 10 #include "base/message_loop_proxy.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 | 69 |
70 int offset() { | 70 int offset() { |
71 return offset_; | 71 return offset_; |
72 } | 72 } |
73 | 73 |
74 WebKit::WebTextCheckingCompletion* completion() { | 74 WebKit::WebTextCheckingCompletion* completion() { |
75 return completion_; | 75 return completion_; |
76 } | 76 } |
77 | 77 |
78 private: | 78 private: |
| 79 friend class base::RefCountedThreadSafe<SpellCheckRequestParam>; |
| 80 |
| 81 ~SpellCheckRequestParam() {} |
| 82 |
79 // Text to be checked in this task. | 83 // Text to be checked in this task. |
80 string16 text_; | 84 string16 text_; |
81 | 85 |
82 // The text offset from the beginning. | 86 // The text offset from the beginning. |
83 int offset_; | 87 int offset_; |
84 | 88 |
85 // The interface to send the misspelled ranges to WebKit. | 89 // The interface to send the misspelled ranges to WebKit. |
86 WebKit::WebTextCheckingCompletion* completion_; | 90 WebKit::WebTextCheckingCompletion* completion_; |
87 | 91 |
88 DISALLOW_COPY_AND_ASSIGN(SpellCheckRequestParam); | 92 DISALLOW_COPY_AND_ASSIGN(SpellCheckRequestParam); |
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
503 | 507 |
504 string16 word; | 508 string16 word; |
505 int word_start; | 509 int word_start; |
506 int word_length; | 510 int word_length; |
507 while (contraction_iterator_.GetNextWord(&word, &word_start, &word_length)) { | 511 while (contraction_iterator_.GetNextWord(&word, &word_start, &word_length)) { |
508 if (!CheckSpelling(word, tag)) | 512 if (!CheckSpelling(word, tag)) |
509 return false; | 513 return false; |
510 } | 514 } |
511 return true; | 515 return true; |
512 } | 516 } |
OLD | NEW |