| 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_language.h" | 5 #include "components/spellcheck/renderer/spellcheck_language.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "chrome/renderer/spellchecker/spellcheck_worditerator.h" | 10 #include "components/spellcheck/renderer/spellcheck_worditerator.h" |
| 11 #include "chrome/renderer/spellchecker/spelling_engine.h" | 11 #include "components/spellcheck/renderer/spelling_engine.h" |
| 12 | 12 |
| 13 | 13 |
| 14 SpellcheckLanguage::SpellcheckLanguage() | 14 SpellcheckLanguage::SpellcheckLanguage() |
| 15 : platform_spelling_engine_(CreateNativeSpellingEngine()) { | 15 : platform_spelling_engine_(CreateNativeSpellingEngine()) { |
| 16 } | 16 } |
| 17 | 17 |
| 18 SpellcheckLanguage::~SpellcheckLanguage() { | 18 SpellcheckLanguage::~SpellcheckLanguage() { |
| 19 } | 19 } |
| 20 | 20 |
| 21 void SpellcheckLanguage::Init(base::File file, const std::string& language) { | 21 void SpellcheckLanguage::Init(base::File file, const std::string& language) { |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 if (!platform_spelling_engine_->CheckSpelling(word, tag)) | 142 if (!platform_spelling_engine_->CheckSpelling(word, tag)) |
| 143 return false; | 143 return false; |
| 144 } | 144 } |
| 145 return true; | 145 return true; |
| 146 } | 146 } |
| 147 | 147 |
| 148 bool SpellcheckLanguage::IsEnabled() { | 148 bool SpellcheckLanguage::IsEnabled() { |
| 149 DCHECK(platform_spelling_engine_.get()); | 149 DCHECK(platform_spelling_engine_.get()); |
| 150 return platform_spelling_engine_->IsEnabled(); | 150 return platform_spelling_engine_->IsEnabled(); |
| 151 } | 151 } |
| OLD | NEW |